Browse by Tags

All Tags » WinForms Async » WinForms (RSS)

Illegal Cross Thread Exceptions under the debugger when using Windows Forms and Whidbey...

The Windows Forms team gets an A today for some super creativity... When you are running under a debugger, and only under the debugger, you start to get a bunch of really strange cross thread exceptions if you try to do something like call Focus() on...
Posted by Justin Rogers | with no comments

Custom event subscription methods can help remove redundant code.

When working with a data-layer and trying to retrieve some list or collection for consumption by a number of different UI elements you run into the situation of having lots of redundant code. As an example, a common approach might have to utilize the...

Visual C# Express 2005: Creating a Poker Application, Source Download

Answering a couple of user questions for persistence: How do you test during the development of an application like Poker? Well, I'd say that the design and whiteboard sketches that I'm going to have in my book really help limit the amount of testing...

[WinForms] Full details of InvokeRequired/Invoke/BeginInvoke, common usage scenarios, and some issues you might not know about.

This is a really big article on all of the operational details of the WinForms marshalling pump (aka the plumbing for Invoke and BeginInvoke). WinForms UI Thread Invokes: An In-Depth Review of Invoke/BeginInvoke/InvokeRequred Abstract: Marshalling the...

Got strange messages in your queue? Maybe Winforms is using it to synchronize your async code onto the UI thread...

I think the fact that BeginInvoke/Invoke/EndInvoke just work is enough for most people. It know it has been enough for me. I didn't even question why it worked, though I did know it was using the message pump, just not exactly how it was using the message...

Windows Forms message filters. How they are handy, misunderstood, and when are they not useful.

Joel B. dropped some interesting questions for me on an very old post of mine People are confused by ApplicationContext in Windows Forms, but there really isn't any magic happening. It seems people are also confused about the entire message pump and what...

People are confused by ApplicationContext in Windows Forms, but there really isn't any magic happening.

Everyone knows the standard syntax Application.Run to get the message pump started and have your forms display. What most people don't know is how the whole process works and how to get multiple forms up and running. To get some background on you can...

Awesome Windows Forms message pump trick...

So WinForms does a great job of giving you a bunch of cool events to hook into your UI. One of my favorites is quickly coming to be synchronizing the TreeView and ListBox classes. So often you have some form of directory structure or hierarchical data...

What does it take to make an Asynchronously drawn ListBox in Windows Forms?

Yeah, yeah, it's been done I'm sure, but I still ran into the problem when making my own picture viewer. The basic issues were thumbnailing images to be displayed in the owner-drawn ListBox while still allowing the UI to respond to the user. Then making...

Dynamic versus Cached Thumbnailing in GDI+

It seems quite a few projects are starting up to perform the common task of creating an image or photo gallery software. Some of these projects are just for managing small collections of photographs located on your local hard disk, others are allowing...
More Posts