jfo's coding
adventures in windows forms and wpf
Intercepting the click event on the ToolStripGrip
Unfortunately, you'll have to override OnMouseDown on the ToolStrip to get the mouse down event for...
Author: jfoscoding Date: 09/29/2005
Creating clonable toolstrip menu items
Here's the code for ToolStripMenuItem.Clone. An alternate solution is to implement...
Author: jfoscoding Date: 09/28/2005
Interested in Windows Forms + WPF (Avalon) interop?
Mike Henderlight seems to have started his very own blog just to cover the subject.
Author: jfoscoding Date: 09/23/2005
Sample for ToolStripManager.Merge
Concepts Before delving into ToolStripManager there are a few concepts to get under your belt Target...
Author: jfoscoding Date: 09/20/2005
Frequently asked Windows Forms questions at the PDC
What's new for Windows Forms 2.0? There is an entire section of the Windows Forms.NET website...
Author: jfoscoding Date: 09/19/2005
Writing custom popup controls
Orangy asks: Hello, thanks for nice articles. Could you please write one about creating...
Author: jfoscoding Date: 09/18/2005
Working with cantankerous controls in VS 8.0
Ben talks about working with custom controls that can crash VS, and how to delete the .suo file to...
Author: jfoscoding Date: 09/18/2005
How NOT to start an application without showing a form =)
The notify icon article started out because I realized, even internally that the best practice for...
Author: jfoscoding Date: 09/18/2005
Hmm, I wonder what Brian is showing off at the PDC?
Brian is blogging again - yeah! And it's all about the PDC. I'm wondering what he's going to show...
Author: jfoscoding Date: 09/09/2005
Tips for Debugging into System.Windows.Forms (and other managed code)
There are just some times when it is super handy to see when function X on the base class has been...
Author: jfoscoding Date: 09/05/2005
What kind of whitepaper are you interested in?
Shawn is real keen on getting the Windows Forms dev team's pencils, uh... keyboards going on writing...
Author: jfoscoding Date: 09/02/2005
Bring your Windows Forms questions to PDC!
Shawn, Ben, Andrew, Mike and I as well as some of the rest of the windows forms team will be there -...
Author: jfoscoding Date: 09/02/2005
Articles as seen on jfo's coding
Here's a summary of the kinds of topics we've trudged through together: Windows Forms 2.0Getting...
Author: jfoscoding Date: 08/31/2005
Keeping yourself out of trouble using SystemEvents
Why do we need both SystemEvents.UserPreferenceChanging and SystemEvents.UserPreferenceChanged? The...
Author: jfoscoding Date: 08/30/2005
ComboBox OwnerDraw in 5 minutes
A question came up the other day about how to add a separator to a ComboBox, and unfortunately the...
Author: jfoscoding Date: 08/26/2005
Full code for ComboBox OwnerDraw
using System;using System.Drawing;using System.Collections;using System.ComponentModel;using...
Author: jfoscoding Date: 08/26/2005
Starting an application without showing a form
There were a lot of good comments/questions about keeping your UI responsive, if you're interested...
Author: jfoscoding Date: 08/24/2005
Shawn on the difficulties of shipping
Quite often, I kid around with my fellow developers when faced with a tough design tradeoff....
Author: jfoscoding Date: 08/16/2005
It's not you, it's me...
Sheesh ever since we've switched over to the new blogging stuff, I haven't really had the time to...
Author: jfoscoding Date: 08/15/2005
Chuck starts blogging...
I've been following Chuck's blog, but I just feel it's not fair to keep it all to myself... [ one |...
Author: jfoscoding Date: 08/13/2005
Painting best practices
Be not afraid…I’m not a very good artist. I remember the first and last time I was recognized for my...
Author: jfoscoding Date: 08/12/2005
Dock layout/Using the Splitter control
Don’t feel bad if you haven’t gotten it yet… it requires a PHd in Dock and Anchor layout to...
Author: jfoscoding Date: 08/12/2005
Overriding Control.Controls
If you're writing a custom control, it's nice to be able to lock off the controls collection from...
Author: jfoscoding Date: 08/12/2005
When, How, Where and Why to use Dispose
Dispose, Part 1What does that pesky Dispose(bool disposing) method do for me?On a blank form, you’ll...
Author: jfoscoding Date: 08/12/2005
So what IS the difference between the Resize and the SizeChanged events?
Believe it or not absolutely nothing. One method calls the other. However because the latter is...
Author: jfoscoding Date: 08/12/2005
Keeping your UI Responsive and the Dangers of Application.DoEvents
What’s the difference between Application.Run and Application.DoEvents? Application.Run continually...
Author: jfoscoding Date: 08/06/2005
More than you want to know about Mouse Input
Someone recently asked for an end-to-end article on mouse handling, just like the keyboard handling...
Author: jfoscoding Date: 07/28/2005
How do I get my control/form to open up in code view by default?
Everyone knows the IDE solution: make the code editor the default editor by right clicking on the...
Author: jfoscoding Date: 07/21/2005
Why don’t my fonts get bigger when I go Large Font?
It all stems back to a rather unfortunate implementation of Control.DefaultFont. Raymond talked a...
Author: jfoscoding Date: 07/12/2005
Changing the behavior of the Help Button
If you're playing around with the Visual Studio 2005 Beta 2, you'll notice the appearance of a help...
Author: jfoscoding Date: 06/21/2005
Updating your RichTextBox safely
I’ve gotten a few more questions about this after the brief mention about the RichTextBox threading...
Author: jfoscoding Date: 05/26/2005
Control.Invoke hangs on multiproc machines
Jack asks: I couldn't find where to post the comment for the cross threading problem. While the...
Author: jfoscoding Date: 05/19/2005
Whidbey help for multithreading woes: CheckForIllegalCrossThreadCalls
A somewhat common programming error is to directly call back onto a piece of UI when you’re on the...
Author: jfoscoding Date: 05/12/2005
WM_NCHITTEST and Resizable ToolStripDropDowns
Jim asks: Do you know of a way to make the ToolStripDropDown resizable by the user, similar to what...
Author: jfoscoding Date: 04/20/2005
Why is STAThread required?
Over the top of your Main method, you may have noticed this funny decoration: [STAThread]static void...
Author: jfoscoding Date: 04/07/2005
Getting the "blue" themed border color
"What color can I use for borders - InactiveCaption is close, but doesnt work in Silver?"...
Author: jfoscoding Date: 03/31/2005
Handling a layout event
I was asked today the correct way to size a panel with a label in it. The panel is a header for a...
Author: jfoscoding Date: 03/30/2005
Suggestions for making your managed dialogs snappier
Diagnosing Performance Problems with Layout So you’ve built up your complex form, and starting it or...
Author: jfoscoding Date: 03/04/2005
Getting ComboBox to show a TreeView (Whidbey)
I tend to shy away from Whidbey only discussions here, but I've been asked a couple times how to get...
Author: jfoscoding Date: 03/03/2005
Windows Forms FAQ - Embraced and Extended
Mike talks about the new FAQ tab on Windows Forms.NET. This includes most the content from the...
Author: jfoscoding Date: 02/04/2005
Access to Windows Forms 2.0 source code
Shawn asks, is access to comment-free source code enough? Let him know how you feel about the...
Author: jfoscoding Date: 02/03/2005
A class for helping track down GDI leaks
Finding leaks This article describes the various methods for tracking down GDI and User handle...
Author: jfoscoding Date: 02/03/2005
Probably more than you want to know about keyboarding in Windows Forms….
The reason why keyboard handling is so complex, is because, well it’s just complex. Before a control...
Author: jfoscoding Date: 01/24/2005
New features to C# in Whidbey
Came across this older article, while looking up details on the new pragma keyword, covering some of...
Author: jfoscoding Date: 01/20/2005
Custom Controls in Windows Forms - Part 7 Advanced Size Management (SetBoundsCore)
Recap We've been building a very basic windows forms control together through the month of December....
Author: jfoscoding Date: 01/04/2005
History of bools and p/invoke
Raymond has an interesting post on the history of boolean across different APIs. Because each...
Author: jfoscoding Date: 12/24/2004
Creating a custom control in winforms - Part 6: Testing!
Continuing on from last time... Now that we've got Painting, Mouse handling up to speed, it's time...
Author: jfoscoding Date: 12/17/2004
Creating a custom control in Winforms - Part 5 Default Values for interesting datatypes
Specifying interesting datatypes in the DefaultValue attribute Ok so last time we got off easy with...
Author: jfoscoding Date: 12/13/2004