Hi
I am currently investigating a very annoying problem with one of our
applications.
We have a UserControl that runs in IE.
As the control fires up the constructor does some status checking and if the
database is in
one of several states we want to notify the user.
Unfortunately there are a couple of issues with this.
Seems like when we used the native MessageBox.Show the control stops
receiving windows messages and never fully initializes. So we came up with a
class that wraps the Windows native MessageBox function in user32.dll.
This version allows the usercontrol to complete and generally behaves
correctly, everywhere but in the constructor.
If we present a message box during the constructor it does not appear to be
modal with respect to the UserControl,
so the user can continue to interact with the U.C. even though we don't want
them to.
This causes all sorts of problems.
I've got to think that maybe the U.C. handle isn't valid, and that's why the
parentage isn't being respected.
Do any of you have an possible solutions for me to try.
In old style SDK programming I'd probably just post a message back to the
U.C. and display the warning a little later,
but I don't want to have to declare a WndProc unless I absolutely have to.
Thanks