Hey all,

I have a htpc project that I am working on. The main program loads dlls which are basically other win forms. On each of these forms, including the main program, I use a picturebox (double buffered picturebox) for the background image and then draw everything on it by hand. Whenever I go from the main program to the dll, I get a weird flicker. It looks like it is the previously used double buffer. Is there any way to clear the background double buffer before the flicker?

Here's a couple of videos of the problem:

Notice the black screen with the white lines on it or the flash of the desktop after I click "Movies." How do I get rid of that?

Thanks for any help,


you could show some kind of "freezer" form.
just create a snapshot of the current form and display it in the freezed form while your dll is loading

I'm not sure that would work. The dll does not show until it is fully loaded. I think because I created a custom control with the picturebox and making it double buffered, the dll when shown shows a garbage buffer. Once the picturebox redraws again, it looks fine. I did try to just not show it until it redraws (by forcing an invalidate) by that didn't solve it either.

I have a feeling it is something really easy too... lol.

Thanks though! :)

Ok, I am tracing through the program. The main program loads, and loads all of the dlls from the plugin directory. When it loads the dlls, the new constructor of each of the dlls are called, which then in turn calls the new constructor of my double buffered picturebox.

In the main program when a key is pressed or mouse button is clicked, there is a extForm(index).showdialog(). RIGHT after the show dialog (in the dll's form_load), the garbage screen is shown. I have set the form and the picturebox to visible=false (and true, to test it) and nothing. Still happens. I have also tried to suspendlayout. Nothing.

So it happens somewhere between the showdialog and the first line in the form load? SERIOUSLY screwy... So I need to blank out the picturebox and refresh it before the showdialog? How the heck can I do that? And yes, I have tried to do that in the new constructor in the double buffered picturebox.

HELP... :) Any ideas?