Author: eclarke | Posted on: 11/5/2010 7:43:57 AM | Views : 277

Hi, I am using a messagebox.show as a dialog, which is called from within the code of a user control.
It works fine but sometimes it appears behind the window that created it and it isn't modal.
I know i need to pass a IWin32Window instance to my messagebox but i can't get to it.
 
I am using
MessageBox.Show("Are you sure you want to save?", "Save Changes?", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.OK it is being called from a click event on a user control
i.e
public partial class MyControl : System.Web.UI.UserControl {
any ideas how i get to the current instance of IWin32Window?
I do use a form on the master page but i am not sure whether this applies
 
thanks
...

Go to the complete details ...