Smart Device
Microsoft ISV
Visual Basic
SQL Server
Windows Forms
Visual C#
VS Team System
Visual FoxPro
Visual C++
.NET Development
Visual J#
Windows Live
Visual Studio
Architecture
VS Express Editions
Software Development Network>> Windows Forms>> How to display a MessageBox as topmost window
How to display a MessageBox as topmost window
Hot Topic
Deployment of security configuration for IE hosted DLL
designer can't load form. Where is 'more information'?
Wrapping MS P2P sdk
What the intention of the "components" variable?
Can't anyone help me with this? - "..timeout period elapsed prior to obtaining a connection from the pool..."
Create a custom DataGridViewColumn for radio buttons
Dropping controls in a custom UserControl
Drag Drop Custom Control
FileInfo::CopyTo() behaving badly?
how to set default value for a textbox?
Windows Forms
Controling DateTimePicker control's regional settings
Problem with BindingContext Position and Adding new record
Image of a web page?
Connect to SQL Server
DataGridViewComboBoxColumn - Display vs. Actual (data) value
Read and view PDF files like adobe activeX
Creating deployment projects
Please help
How to add custom column style to add button in DataGridCollumnStyle Collection Editor dialog?
TabControls
How to display a MessageBox as topmost window
Hi,
I'm looking for a way to display a MessageBox as the topmost window.
Any Ideas on how to do this using .NET / WindowsForms
Thanks,
Erik
Answer this question
How to display a MessageBox as topmost window
vinutha
Thanks for your research and giving use a good information...
Nitesh Menon
isn't it already a modal window
KeeperOC
I found a solution myself. It's straightforward to call the original Win32 MessageBox API:
[DllImport("user32.dll")]
public static extern int MessageBox(int hWnd, String text, String caption, uint type);
Once this is done I can include the MB_TOPMOST constant in the type to get it to be topmost.
Erik
mike93108
Yeah, but it's application modal nit system modal...
Earl Jr
Hi,
Message box always open as the model window. So it will remain on top if your application is set to be the top most....
Therefore your can try these..
1) Just before poping up the Messagebox just make your application got focus and set it to be top most...
Than open your message box..
OR
2) simply make your own Message box Dialog form and set the form as top most and than pop up that custom message box....
How to display a MessageBox as topmost window
Answer this question
How to display a MessageBox as topmost window
vinutha
Nitesh Menon
KeeperOC
[DllImport("user32.dll")]
public static extern int MessageBox(int hWnd, String text, String caption, uint type);
Once this is done I can include the MB_TOPMOST constant in the type to get it to be topmost.
Erik
mike93108
Earl Jr
Message box always open as the model window. So it will remain on top if your application is set to be the top most....
Therefore your can try these..
1) Just before poping up the Messagebox just make your application got focus and set it to be top most...
Than open your message box..
OR
2) simply make your own Message box Dialog form and set the form as top most and than pop up that custom message box....