Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
Doing as teixeira suggests will allow a dialog, but being on the Pocket PC it will be full screen. This might suit your purposes but I suspect you wanted a floating dialog like the actual MessageBox. As for how todo this or if it's infact possible I'm not entirely sure.
Anybody looking for a graduate programmer (Midlands, England)?
Posted
To the best of my knowledge there is no managed code solution. As far as I know the only way to achieve a floating dialog is through various API calls to methods such as MoveWindow(). A search on google for something like "floating dialog" "compact framework", should help you find an example.
Anybody looking for a graduate programmer (Midlands, England)?
Posted

Alternatively you could inherit from the panel class and dynamically create ontop of your current form - not strictly a dialog, but you'd be able to do pretty much anything with it...

 

 

Paul.

Posted
This is true and is a method I have employed in the past. The trickiest aspect of doing it this way is making the Panel modal so that the form behind it cannot be clicked untill the dialog is closed. In my case this wasn't too tricky as the entire page worked on GDI and clickable regions, rather than using standard System.Windows.Forms controls. Because of this I could solve this problem by temporarily unhooking the click events of the form. If somebody has a solution for achieving a truly modal panel, I'd certainly be interested to hear their ideas.
Anybody looking for a graduate programmer (Midlands, England)?
Posted
One possibility would be to put down two panels - the first having being made transparent. The second, being the dialog, obviously contains the message. I've never tried it, though.......
Posted
It's a nice idea but not actually workable since you cannot have a truly transparent panel. Setting the background colour to Transparent simply makes it's background colour the same as that of it's parent. A cheeky way of doing it might be to take a screenshot of the applications state before creating the dialog. Adding this to a picturebox infront of all other controls, then putting the dialog infront of it. But to the best of my knowledge there is no managed way todo this and as such you'd be better off just looking into using MoveWindow to resize the form. This would remove the modal problem as the Form class has a ShowDialog() method that essentially does it for you.
Anybody looking for a graduate programmer (Midlands, England)?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...