You are at the archive for the windows forms category &rarr


Windows Forms Globalization

Posted January 8th @ 6:21 pm by aaron

It’s amazing how the process of making an application localizable can be both simple and confusing at the same time. At a basic level, the Visual Studio designer makes it very easy. Set the "Localizable" property on your form to True and you’re good to go. It’s very convenient.
On the other hand, there are a […]

Watermarked edit controls

Posted December 1st @ 5:58 pm by aaron

Recently I wanted to use a WinForms TextBox with some “watermark text”, but had some trouble finding anything existing on the web. Which was surprising because of how ubiquitous they are. Turns out the terminology varies: cue, prompt, or watermark. And “watermark” is the least used.
Once I got my ducks in a row (by perusing […]

.NET 2.0 WinForms multithreading and a few long days

Posted May 19th @ 12:37 am by aaron

The .NET 2.0 SynchronizationContext class and its prominant children, WindowsFormsSynchronizationContext and AspNetSynchronizationContext (no docs), are used to encapsulate the marshalling of code execution back into an appropriate thread context. In the case of the SynchronizationContext class, it simply posts a job to the ThreadPool because there really isn’t a specific threading context that requires […]

Lock updates for a control

Posted February 24th @ 5:36 pm by aaron

Raymond Chen just finished a short series on LockWindowUpdate, including when to use it and when not to. I enjoy reading Raymond’s blog for a number of reasons. His posts are short, to the point, and well written, and he discusses topics that I, as a .NET developer who is younger (read: showed […]

Control.Trifecta: InvokeRequired, IsHandleCreated, and IsDisposed

Posted December 15th @ 1:10 am by aaron

Talking about Control.InvokeRequired seems like something so old, yet as I do a Google blog search for InvokeRequired I see only partial explanations and haphazard examples. I guess that’s what happens in “sample code world”, but the problem is that too many developers live in that world. (I know I’ve lived there before, and […]

Start small and work up

Posted September 28th @ 12:20 am by aaron

I re-learned an important lesson tonight: start small and work up from there.
I was working on creating a Form that intercepts the WM_MOUSEACTIVATE message to prevent a click from stealing focus from another form (i.e. a menu, or a drop down list). In my experimentation I had a “grand” idea to create a class […]

Hawkeye

Posted August 31st @ 12:24 pm by aaron

I just installed Hawkeye, and I’m pretty impressed!
What is Hawkeye? From the website:
“Hawkeye is the only .Net tool that allows you to view, edit, analyze and invoke (almost) any object from a .Net application. Whenever you try to debug, test, change or understand an application, Hawkeye can help.”
I haven’t put it through any sort of […]

Metadata Attributes for Custom Controls

Posted April 6th @ 10:16 am by aaron

This link (here) may not be exhaustive (but it might be), but it offers a useful list of attributes that can be applied to custom controls to support better design-time interaction.
I find it useful to be able to right-click a property in the designer and select “Reset” to return it to the control’s default value. […]

Embedding Flash in C#

Posted March 31st @ 12:33 pm by aaron

This is something I think you’d want to avoid like the plague, but it might have it’s benefits (as in the article–cheap charting).
Here’s the article

Options:

Size

Colors