High DPI - it's an everyone thing.

As larger displays are becoming more popular, they’re increasingly being used in places like the livingroom.  And if you’ve ever tried to read text across the room with the default DPI setting, you’ll find you may need a pair of opera glasses. In Windows 7, if you’re using a larger display, the OS will automatically adjust for…

1

Avoiding throwaway layout/painting/mouse code

I’m not normally a Hungarian fanatic or anything, but it is quite easy to create “write once” layout/painting code.  If there’s ever a problem with the math the code needs to be tossed out because it’s too confusing or too difficult to update.  I think we’ve all either seen this kind of code and/or have…

0

How can I remember which order Margin properties are set?

Often you can stare at a margin property “10,20,30,40” in XAML and be slightly confused as to which is which property.  If I have to deal with a format over and over again I will come up with a trick to remember how to work with it. My trick is to remembering Thickness/Margin is by saying “LTRB” as in…

1

VB6/Winforms interop

Check out the Microsoft InteropForms Toolkit 1.0 This toolkit helps you bring the power of .NET to your existing VB6 applications, by allowing them to display .NET WinForms from within the same application. Instead of upgrading the entire code base, these applications can now be extended one form at a time. The goal is a…

3

Josh seems to be having fun with Renderers

It looks like he’s put together a very convincing VistaToolStripRenderer, and promises a tell-all series of articles.  Stay tuned!

1

Workaround for disabled flyouts

Frans ran into some trouble disabling parent menu items.  Turns out they dont disable the evaluation of child shortcuts.  This was an oversight on our part.  That said, most applications remove flyouts that are not in-use so as to not taunt users with menus they can’t click on.  =)   Here’s a quick workaround.  Add this…

4

Win32 Activation and Focus

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 really separate things.  Experimenting for a moment – if you bring…

3

Rule of thumb for System.Drawing

A friend of mine ran into this the other day. If you call a method to get a handle some sort of System.Drawing object, you may be creating an object that needs to be cleaned up through P/Invoke or some other function call. Bitmap.GetHIcon – requires p/invoking DestroyIcon.Font.ToHFont – requires p/invoking DeleteObjectGraphics.GetHdc – requires calling Graphics.ReleaseHdc…

4

Tim resurfaces with another control

I enjoy talking to Tim Dawson quite a bit; we both know that making the decision to build your own menu is not one to be taken lightly.  He’s been busy lately.

0

How do I detect when the WindowState changes?

Most of the time, you can get away with checking it in the Form.SizeChanged or Form.Resize event.  If you remember, there’s no difference between the two events so it doesnt matter what you pick. However it was pointed out to me that if you specify a maximum size for your window, this methodology wont work.  The actual…

1