Hi
If so, I think you may try to call the MessageBox API directly which
provide more options than the .NET version.
public class MBSpecial
{
public const UInt32 MB_SETFOREGROUND = 0x00010000;
public const UInt32 MB_DEFAULT_DESKTOP_ONLY = 0x00020000;
public const UInt32 MB_SERVICE_NOTIFICATION_NT3X = 0x00040000;
public const UInt32 MB_TOPMOST = 0x00040000;
public const UInt32 MB_RIGHT = 0x00080000;
public const UInt32 MB_RTLREADING = 0x00100000;
public const UInt32 MB_SERVICE_NOTIFICATION = 0x00200000;
}
[DllImport("user32", EntryPoint="MessageBox")]
public static extern int MessageBoxA(IntPtr hwnd, string lpText, string
lpCaption, UInt32 wType);
private void button2_Click(object sender, System.EventArgs e)
{
MessageBoxA(this.Handle,"test","test",MBSpecial.MB_TOPMOST);
}
MessageBox Function
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui
/windowsuserinterface/windowing/dialogboxes/dialogboxreference/dialogboxfunc
tions/messagebox.asp
Best regards,
Perter Huang
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
David Thielen - 20 Jan 2005 06:39 GMT
Thank you - that works. I hope with .NET 2.0 I won't have to make so many
calls to the unmanaged Win32 API.
thanks - dave
> Hi
>
[quoted text clipped - 32 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "AS IS" with no warranties, and confers no rights.
"Peter Huang" [MSFT] - 20 Jan 2005 09:50 GMT
Hi
I am glad that works for you!
We will keep improving our product.
Also you may try to submit the feedback to our mswish website.
http://register.microsoft.com/mswish/suggestion.asp
Thanks!
Best regards,
Perter Huang
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.