Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

Michael Wolski

@Michael Wolski
About
Posts
14
Topics
7
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • XML inside WebBrowser control causes large delay when unloading the control
    M Michael Wolski

    Well, it seems whenever i ask a question I figure out a workaround. In this case, I am still not 100% sure why this works. And yes, the DoEvents() is necessary for this the page to close quickly (due to asnync loading I guess). private void button1_Click(object sender, EventArgs e) { // From here... WebBrowser wb = (WebBrowser)this.tabControl1.SelectedTab.Controls[0]; wb.Navigate(""); Application.DoEvents(); this.tabControl1.TabPages.Remove(this.tabControl1.SelectedTab); // ... to here now takes about 1 second. }

    Michael Developer, Author, Chef

    .NET (Core and Framework) xml performance help question

  • XML inside WebBrowser control causes large delay when unloading the control
    M Michael Wolski

    Has anyone experienced this, or a workaround? I am using a WebBrowser control to display an xml file from the file system. The size of the xml file is 190k. Everything is fine except when I close the control (say using a tabbed interface). When closing/removing the browser control, the application experiences a large delay (~7 secs on my machine). Internet Explorer (7) does not show this behavior; it loads up the file at the same speed (as me) and closes immediately with no delay. Any insight would be appreciated. Here is the code I refined down to illustrate the problem. private void Form1_Load(object sender, EventArgs e) { TabPage page = this.tabControl1.TabPages[0]; WebBrowser wb = (WebBrowser)page.Controls[0]; // this file is ~190k, takes 3 secs to load. wb.Navigate(@"D:\temp\large.xml"); } private void button1_Click(object sender, EventArgs e) { // From here... this.tabControl1.TabPages.Remove(this.tabControl1.SelectedTab); // ... to here takes about 7 seconds. }

    Michael Developer, Author, Chef

    .NET (Core and Framework) xml performance help question

  • VirtualPathProvider and Caching
    M Michael Wolski

    We have a ASP.Net 1.1 application we are moving to ASP.Net 2.0. The resources for this application are embedded, and served up using a virutal HTTP module. For example, an image on a page would have a url of getimage.aspx?smiley.gif , and the actual smiley.gif image is embedded in a .dll as a resource. The module extracts and serves up the image when it is called. In ASP.Net 2.0 I have implemented a VirtualPathProvider to do the same thing, and it appears to work but with 1 caveat: The first call to the resource is cached and that value is always used. So if I make a call to getimage.aspx?smiley.gif I get the correct image, but if I make the call again to (say) getimage.aspx?frowny.gif I get the smiley.gif image. I have debugged this to the point I know that the 2nd call isn't coming through, and figure it is caching my virtual url after the first call. How can I stop this? I want it to never cache the getimage.aspx page (or at least to detect the parameters are different, which I would have thought it should be doing anyway) Note: I have overridden GetCacheDependency to return Null, and it didn't change anything. I also tried overriding GetCacheKey, providing it unique keys for each call, to no avail. Any help/insight on this?

    Michael Developer, Author, Chef

    ASP.NET question csharp asp-net hardware help

  • Oracle GUID support
    M Michael Wolski

    We currently use the .net SQL Server managed data provider for database access, but we are looking at possibly extending our app support to Oracle. The .net Oracle managed data provider looks like a good solution, but it brought up some questions. What support does Oracle provide for a GUID data type? What versions of Oracle support this? We notice that the Oracle data reader has the same GetGuid() SetGuid() that SQL Server provides, but are not sure how it is implemented in an actual Oracle table. So if anyone has any info on this (or can give us a juicy link with this info) us non-Oracle guys would appreciate it! Michael Developer, Author, Chef

    Database database csharp sql-server oracle sysadmin

  • How to float window over application properly
    M Michael Wolski

    Bah! I knew I was overlooking something simple, but was too brain-fried last night to come up with it. Many thanks again for input Heath! Michael Developer, Author, Chef

    C# question help tutorial

  • How can I send an Image over a socket connection?
    M Michael Wolski

    One of the overloads for the Image.Save() method takes a System.IO.Stream. You could stream it memory, then send those bits via socket. Something like... using System.IO; using System.Net.Sockets; Bitmap bmp = new Bitmap(@"c:\mypic.gif"); System.IO.MemoryStream memImage = new MemoryStream(); bmp.Save(memImage,System.Drawing.Imaging.ImageFormat.Gif); byte[] data = memImage.ToArray(); Socket socket = new Socket(...your options here...); socket.Send(data,0,data.Length,SocketFlags.None); Hope that gets you started! Michael Developer, Author, Chef

    C# question

  • Forms.ComboBox
    M Michael Wolski

    One approach would be to... Make the popped-up area a parentless, topmost Form that holds whatever custom control you wish. You can initialize it something like: protected void InitMyPoppedForm { ... this.TopMost = true; this.Deactivate += new System.EventHandler(this.MyPoppedForm_Deactivate); ... } Then you need to handle the Form's deactivate event, which fires when the user clicks anywhere else other than inside the MyPoppedForm. At the very least this should simply close the popped up form (like a combobox "rolls up" when it loses focus). Something like: private void MyPoppedForm_Deactivate(object sender, System.EventArgs e) { Hide(); NotifySomeoneILostFocus(); } Hope that helps. Michael Developer, Author, Chef

    C# question

  • How to float window over application properly
    M Michael Wolski

    I am sure there is a simple way to do this, but heck if I can figure it out tonight. Does anyone know of a way to float a child Form (say tool window) in an application properly? I have a main Form, and I create a new child Form (tool window) with a parent of null and TopMost set to true. This allows my tool window to float over the app nicely. The problem is when I switch to another application, my toolwindow is still staring me in the face since it is TopMost! How can I make it float topmost only when the application is active? Is there a way to distinguish between the application losing activation because the user switched to another app or because they clicked on the child tool window (which causes a deactivate)? Any ideas would be greatly appreciated! Michael Developer, Author, Chef

    C# question help tutorial

  • How long for article to appear on the site?
    M Michael Wolski

    Looks like I have my answer! For any other new author who is interested: submitting an article to submit@codeproject.com took 2 business days to appear. (I assume that is normal) Michael Developer, Author, Chef

    Article Writing com question

  • How long for article to appear on the site?
    M Michael Wolski

    I submitted an article to submit@codeproject.com on Saturday and was wondering how long it would take (generally) to appear on the site. (It should have required little if any changes) Anybody have any ideas? Just trying to figure out when I should expect it. Michael Developer, Author, Chef

    Article Writing com question

  • RichTextBox and ITextHost
    M Michael Wolski

    Heath, 1) Just wanted to let you know that I was successful in taking the second route you outlined. I initially spent about 2 hours trying to get everything defined in C#. This was a bit of a nightmare as you suggested. Then I spent about 10 minutes doing it as a mixed-mode MC++ class library, and exposing the routines I needed. Works like a charm! In the future, I plan revisit the c# way (to eliminate the mc++ dll and learn what I was doing wrong), but for now this is completely workable. Thanks for the previous advice. 2) 5 Years ago I was lucky enough to take a 1 year sabbatical. What did I do? Since I was about to turn 30 I decided I wanted to see the world, but learn something as well. Since I have always cooked, I decided to go to Paris and attend culinary school at Le Cordon Bleu. I heartily reccommend it for burned-out developers! Amazing time, amazing people, amazing food, and an amazing amount of work. The only problem: Software pays way too much to let it go completely! So I heartily applaud the mid-life career change, but I warn you that you will find it hard to let go of your current one. Thanks again! Michael Developer, Author, Chef

    C# c++ csharp php com help

  • RichTextBox and ITextHost
    M Michael Wolski

    Heath, You had 49 minutes (since I posted) to think about and write a response and that is all you could manage? ;) Seriously, many many many many thanks for the tips and pointers. I will be looking into this as you suggest. If I manage to get this working well, I will share the info in the form of an article. Again, thanks thanks thanks for setting me down the right path! Michael Developer, Author, Chef

    C# c++ csharp php com help

  • RichTextBox and ITextHost
    M Michael Wolski

    I am trying to draw RTF text in my custom UserControl without actually having a RichTextBox window. I have seen a couple articles on the web about creating a windowless RichTextBox by supplying it with a custom ITextHost interface (see http://www.codeguru.com/Cpp/controls/richedit/windowless/article.php/c5367). The problem is, these examples are for c++ and I am wondering how one could go about doing this from C#. Is there a way to somehow import the ITextHost interface from the control? Does anybody have any clue to point me in the right direction? (and no, I am not above using unmanaged code to get this to work). Or is there a better way to accomplish this? Thanks in advance! Michael Developer, Author, Chef

    C# c++ csharp php com help

  • DirectX Display
    M Michael Wolski

    I am looking for opinions about how one might create a DirectX on screen display. Basically, I want to display some on-screen information (text and graphics) while video is playing full-screen in another application. The idea is that the video underneath will still be visible (a transparent overlay). The video application uses (I believe) DirectX/DirectShow to play the video. Originally I thought if I just created an always on-top window I could display the information I want. But the on-top window flickers and is barely viewable (it looks like the constantly updating video kinda defeats the on-top window). Not knowing much about DirectX (but very capable otherwise), I was hoping someone would have a tip about getting the drawing surface of the video application so I can accomplish this task. Or, if there is a way via DirectX to create a layer above the video application that will combine with the video (and not flicker). Any ideas greastly appreciated. Michael Author, Developer, Chef

    IT & Infrastructure graphics game-dev discussion
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups