ShowDialog working semi-modally

B

Bill Albert

Hi,
I'm creating a dialog that needs more controls than a simple MessageBox. I
don't want it to take up the whole screen and I would like it to be movable
by the user (just like a MessageBox).
I've created a Form and set FormBorderStyle to None.
I call it using ShowDialog. ShowDialog is modal and blocks the calling
form - that's good. The Dialog box works fine. The problem is that if I
click on an area outside of my dialog box, my dialog box loses focus and the
calling form is brought to the front.
How can I block any clicks outside of my dialog box while it's open?

Thanks,
Bill Albert
ObTech
 
R

Robert Lalouche

Yes - I need this answered too. I'd like to put a check box in the message
box offering option not to show message again. I ran in to the same problem
if I used my own form - does anyone know how to extend the MessageBox
functionality, but maintain its completely "modal" functionality despite not
occupying the entire PocketPC screen?

Robert Lalouche
 
S

Steve

Just thinking but one possible solution would be to get the windows handle
of your form and set it to always be on top. I will try and find the code to
get the window handle in CF, but if you search the net you should find it.

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top