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

    Chuck starts blogging...

    • 0 Comments
    I've been following Chuck's blog, but I just feel it's not fair to keep it all to myself... [ one | two | three ]
  • jfo's coding

    So what IS the difference between the Resize and the SizeChanged events?

    • 2 Comments
    Believe it or not *absolutely* nothing. One method calls the other. However because the latter is named "Changed" it can be used for data binding - so while I dont have any concrete proof, that's my theory on why both exist. However, if you are doing...
  • 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

    Handling DragDrop in 5 min

    • 8 Comments
    Lets do a really simple sample, drag the text from a link label into a text box. Once you understand this sample, you should pretty much be able to rock and roll on any drag/drop. We're going to mouse down on the label and drag it over the text box...
  • 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

    How do I get my control/form to open up in code view by default?

    • 0 Comments
    Everyone knows the IDE solution: make the code editor the default editor by right clicking on the file in solution explorer, selecting "Open With", pick your favorite editor, then choose "Set As Default". Unfortunately this applies to all files, which...
  • jfo's coding

    Why don’t my fonts get bigger when I go Large Font?

    • 3 Comments
    It all stems back to a rather unfortunate implementation of Control.DefaultFont. Raymond talked a bit about DEFAULT_GUI_FONT the other day, and mentioned that no one is using it anymore. Unfortunately, this is the default font for controls. DEFAULT_GUI_FONT...
  • jfo's coding

    Changing the behavior of the Help Button

    • 3 Comments
    If you're playing around with the Visual Studio 2005 Beta 2, you'll notice the appearance of a help button at the top of the dialogs. Rather than taking up 75x23 pixels of real estate, the dialogs in Visual Studio have chosen to repurpose the "?" button...
  • 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

    Control.Invoke hangs on multiproc machines

    • 0 Comments
    Jack asks: I couldn't find where to post the comment for the cross threading problem. While the solution seems to be Control.BeginInvoke/Control.Invoke, There seems is a known issue about Control.Invoke that can cause it to hang up in Control.MarshaledInvoke...
  • 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

    WM_NCHITTEST and Resizable ToolStripDropDowns

    • 0 Comments
    Jim asks: Do you know of a way to make the ToolStripDropDown resizable by the user, similar to what the SizingGrip of a StatusStrip does for a form? The sizing grip of status bars (and the resize handles of forms, etc) are typically done by responding...
  • 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

    Getting the "blue" themed border color

    • 0 Comments
    "What color can I use for borders - InactiveCaption is close, but doesnt work in Silver?" System.Windows.Forms.VisualStyles.VisualStyleInformation.TextControlBorder Prior to Whidbey, you would have to directly use the UxTheme API . I would recommend waiting...
  • jfo's coding

    Handling a layout event

    • 0 Comments
    I was asked today the correct way to size a panel with a label in it. The panel is a header for a column of UI, which seems to be a common pattern in applications today. The question was: when I resize the panel, how can I make sure that the height of...
  • 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

    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

    Windows Forms FAQ - Embraced and Extended

    • 0 Comments
    Mike talks about the new FAQ tab on Windows Forms.NET. This includes most the content from the original FAQ maintained by George Sheperd plus new stuff for Windows Forms 2.0. Let him know what you think of it.
  • jfo's coding

    Access to Windows Forms 2.0 source code

    • 0 Comments
    Shawn asks, is access to comment-free source code enough ? Let him know how you feel about the matter.
  • jfo's coding

    A class for helping track down GDI leaks

    • 3 Comments
    Finding leaks This article describes the various methods for tracking down GDI and User handle leaks. Unfortunately in Win2k/XP you cannot tell which kind of handles are out (windows 9x used to distinguish) - however I haven't usually needed to know...
  • 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

    New features to C# in Whidbey

    • 0 Comments
    Came across this older article , while looking up details on the new pragma keyword , covering some of the new Whidbey features in C#. Amongst the usual things that are discussed (generics, refactoring), I'm not sure they give enough credit to the enhanced...
  • jfo's coding

    Custom Controls in Windows Forms - Part 7 Advanced Size Management (SetBoundsCore)

    • 3 Comments
    Recap We've been building a very basic windows forms control together through the month of December. So far we've learned how to do simple painting, handle mouse movement, and create properties that codegen correctly. J ust before the holidays, we were...
  • jfo's coding

    History of bools and p/invoke

    • 0 Comments
    Raymond has an interesting post on the history of boolean across different APIs. Because each different kind of boolean has a different size/interpretation for true/false, when writing a p/invoke definition it's important to use the MarshalAs attribute...
  • jfo's coding

    Creating a custom control in winforms - Part 6: Testing!

    • 2 Comments
    Continuing on from last time ... Now that we've got Painting, Mouse handling up to speed, it's time to build a test application. After adding a Square to your control, add these few lines in OnLoad (or after initialize component) PropertyGrid pg = new...
Page 6 of 7 (159 items) «34567