jfo's coding

adventures in windows forms and wpf

Blog - About

About jfo's coding

About JFo

Jessica (aka JFo) has 9 years experience building user interface libraries at Microsoft.   As a developer on the Windows Forms team, Jessica designed and implemented various aspects of the Windows Forms runtime for the 1.1 and 2.0 releases of the .Net Framework.  Her current project is the "Cider" designer for the "Dev10" release of Visual Studio.

About the blog

This blog is designed to talk about two different subjects: Windows Forms and the "Cider" designer for the Windows Presentation Foundation.  For a list of articles on Windows Forms, be sure to check the "Best and worst of JFos Coding by Category."

Providing WPF feedback

There are multiple ways customers can provide feedback and suggestions for Windows Presentation Foundation:

Providing Cider Feedback

Cider is in its early stages of development.  We encourage customers to send us feedback through  

Providing Windows Forms Feedback

There are several ways to provide feedback to the Windows Forms team

 

  • jfo's coding

    Suggestions for making your managed dialogs snappier

    • 8 Comments
    Diagnosing Performance Problems with Layout So you’ve built up your complex form, and starting it or resizing it is slightly more exciting than watching paint dry. It could very well be that the way everything is hooked up, the dialog is fighting layout...
  • jfo's coding

    Why is STAThread required?

    • 11 Comments
    Over the top of your Main method, you may have noticed this funny decoration: [STAThread] static void Main() { Several people have asked, what is this and is it this actually necessary? When the STAThreadAttribute is applied, it changes the apartment...
  • jfo's coding

    Keeping your UI Responsive and the Dangers of Application.DoEvents

    • 21 Comments
    What’s the difference between Application.Run and Application.DoEvents? Application.Run continually processes window messages for your application, raising events as necessary. Application.DoEvents processes all the window messages in the queue until...
  • jfo's coding

    Visual Studio Image Library

    • 5 Comments
    A customer from Las Vegas DevConnections asks: It seems like, but I may be mistaken, that you said something about posting some new set of toolbar icons on your blog? Was I in a Vegas-induced stupor or did you really say that? Yes, I really,...
  • jfo's coding

    Using BackgroundWorker Effectively

    • 2 Comments
    If you are not familiar with the BackgroundWorker , it is a newly released component within Windows Forms 2.0 which adds safe, easy, multithreading capabilities to your application. By using a pattern of method calls (RunWorkerAsync, ReportProgress...
  • jfo's coding

    Some tricks for working with WPF’s RichTextBox

    • 2 Comments
    I’ve been playing around with the RichTextBox, and as Richard points out, the free spell checking on WPF TextBoxes is really cool – especially for the “spelling challenged” such as myself. The programming model for the WPF RichTextBox is quite a...
  • jfo's coding

    Probably more than you want to know about keyboarding in Windows Forms….

    • 16 Comments
    The reason why keyboard handling is so complex, is because, well it’s just complex. Before a control can get called on the OnKeyDown/Press/Up event, we need to filter out several things Shortcuts which execute menu commands (e.g. Control+O on a MenuItem...
  • jfo's coding

    Updating your RichTextBox safely

    • 5 Comments
    I’ve gotten a few more questions about this after the brief mention about the RichTextBox threading problem . Is it just a rich text box problem? Can I use a TextBox instead? No, unfortunately all windows forms UI, as well as most Win32 UI...
  • jfo's coding

    Win32 Activation and Focus

    • 3 Comments
    For the most part, activation and focus work pretty darn well in windows, until you want to tweak something that doesn’t fit within the typical windowing model or roll your own menu. Most folks don’t separate out activation and focus, but they are...
  • jfo's coding

    DataGridView FAQ now posted

    • 10 Comments
    As promised : here's the link to the DataGridView FAQ . There's also a set of demo applications . There are whole bunch more FAQs up on Windows Forms.NET with quite a bit of good info in them. <shameless ask for plug> Please check the FAQs...
  • jfo's coding

    Notify applications where the form disappears from the taskbar on minimize

    • 14 Comments
    Jim asks: "I've been following your Windows Forms articles, and was hoping that you could post about the correct way to minimize a Windows Form to the tray. The ShowInTask property of the Form is mentioned in newsgroups, but the Form still shows...
  • jfo's coding

    Getting ComboBox to show a TreeView (Whidbey)

    • 2 Comments
    I tend to shy away from Whidbey only discussions here, but I've been asked a couple times how to get a combobox to show a treeview - so I thought I'd share with y'all what I whipped up in 20min. The interesting thing here is what you can do with a ToolStripDropDown...
  • jfo's coding

    Are you familiar with [ThreadStatic]?

    • 12 Comments
    If you're stuffing anything in thread local storage, you might be interested in the performance comparison between Thread.SetData and [ThreadStatic] . ThreadStatic is super-cool, if you have a static variable, you can make it static "per-thread" by...
  • jfo's coding

    More than you want to know about Mouse Input

    • 3 Comments
    Someone recently asked for an end-to-end article on mouse handling, just like the keyboard handling article. Fortunately, mouse handling is not as complicated as keyboard handling, but there are a few topics we should probably chat about. The Whidbey...
  • jfo's coding

    Tips for Debugging into System.Windows.Forms (and other managed code)

    • 5 Comments
    There are just some times when it is super handy to see when function X on the base class has been called with a certain value. The best example I have of this is debugging layout. 99.99% of all sizing/location logic routes through one single method in...
  • jfo's coding

    Whidbey help for multithreading woes: CheckForIllegalCrossThreadCalls

    • 3 Comments
    A somewhat common programming error is to directly call back onto a piece of UI when you’re on the wrong thread. Consider this seemingly innocuous piece of code: System.Timers.Timer t = new System.Timers.Timer(); public Form1() { InitializeComponent...
  • jfo's coding

    Starting an application without showing a form

    • 3 Comments
    There were a lot of good comments/questions about keeping your UI responsive, if you're interested in threading/application contexts etc, it's worth a peek . I thought I'd rehash something today I've already talked about, but it is buried in my how...
  • jfo's coding

    More on "Avalon" RichTextBox

    • 11 Comments
    As promised , I learned more so I'm sharing. Last time I figured out how to stuff plain text into the RichTextBox, but that's not very "rich", is it? How do I put RTF (rich text format) into a RichTextBox? It turns out the support for this seems to...
  • jfo's coding

    All About Handles in Windows Forms

    • 2 Comments
    (Repost from JFo's Talkin) Handle Creation What is a Handle? A handle (HWND) is the return value from CreateWindowEx which the Windows Operating System uses to identify a window. A "window" in win32 is a much broader concept than you may think - each...
  • jfo's coding

    A new way of saying IsInputKey: PreviewKeyDown

    • 3 Comments
    A year ago, I diagramed the maze that is Windows Forms keyboard handling . There are some new helper methods in 2.0 that I havent gotten a chance to mention, which I thought might be interesting. This first is PreviewKeyDown . If you've struggled...
  • jfo's coding

    UseCompatibleTextRendering - Compatible with whaaaaaat?

    • 10 Comments
    There seems to be quite a bit of confusion around this little old flag that has cropped up in VS 2005. In Windows Forms 2.0, we added support for drawing GDI text. At first we had grandiose plans of poking and prodding at the DrawText API such that...
  • jfo's coding

    You gotta learn to let it go: Top 4 memory leaks

    • 7 Comments
    I got a note from Mukund, who is investigating a memory leak problem. Hi Jessica, Is it true that you cannot explicitly destroy objects in VB.NET? Mukund, the truth is that the CLR both giveths and takeths away the memory for you. Once a whole...
  • jfo's coding

    Creating a Custom Control in Winforms - Part 1

    • 3 Comments
    Creating the Square control Creating a custom control in windows forms is very simple – there are a few gotchas along the way – so I thought I’d make a sample control called “Square” to walk through it. The square will obviously have sizing restrictions...
  • jfo's coding

    Random tip of the day: adding a shortcut to all desktops in Windows Vista Server 2008

    • 2 Comments
    I've been puzzling how to do this for a little while, as I had some common shortcuts I wanted to add to the desktop for everyone on my team to use. The way to do this in Windows XP has been to use the "All Users" account and add to the desktop folder...
  • jfo's coding

    Grabbing .dmp files from crash dialogs

    • 3 Comments
    If you're a company wanting to get access to the data from the crash dialog, this article isn't for you. But this is . Also, I am not an expert in this topic. Now that that is off my chest, and we've all had fair warning, here's my scenario: I've...
Page 1 of 7 (159 items) 12345»