Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Elegant Ribbon Tech Support » MessageBox Hides Behind Dialog Forms Collapse All
Subject Author Date
Anthony Casagrande Oct 19, 2010 - 5:14 PM

It has come to my attention that the Elegant.Ui.MessageBox will show up behind a dialog form that creates it. When using a regular MS MessageBox, it doesn’t do this. I assume this is a simple fix.

Form1.cs:

MyDialogForm frm = new MyDialogForm();
frm.ShowDialog();


MyDialogForm.cs:

private void button1_Click(){
    // Shows up behind this form since this form is a dialog form
    Elegant.Ui.MessageBox.Show("Hello");
}

Anthony Casagrande Oct 20, 2010 - 10:05 AM

The MyDialogForm was actually calling a static function which was creating the MessageBox. I am not sure if that is what caused it, but i was able to fix it by using Christopher’s solution. I had to use Form.ActiveForm to get the form since i was in a static context, like so:

Elegant.Ui.MessageBox.Show(Form.ActiveForm, "Hello");

Thanks.

Technical Support Oct 20, 2010 - 12:51 PM

We are glad that everything works fine on your side now. It would be of a great help if you could send us a sample that illustrates the bug. We would like to fix it.

Anthony Casagrande Oct 25, 2010 - 1:25 PM

I did some more digging, and it appears that the DialogForm has nothing to do with it. In my sample project if you change frm.ShowDialog() with just frm.Show() it will still be behind it (you might have to drag the secondary form towards the center of the screen so it can get in the way.). It is all because of the TopMost=true. So the bug definition should now read:

"Elegant Ui Message Boxes hide behind top most forms"

Anthony Casagrande Oct 25, 2010 - 1:11 PM

I think i found out the trigger of this. I was having trouble getting the bug to happen again and it turns out the issue was not with the static function, but instead because the dialog form had this property set in the designer view:

TopMost = true;


I can’t find a spot to upload the sample project so i will email it to support@prof-uis.com . The subject line will be the same as this forum title: "MessageBox Hides Behind Dialog Forms"

Technical Support Oct 26, 2010 - 12:33 PM

Thank you for the bug report. We fixed this issue. We are releasing v.3.8 beta version these days.

Technical Support Oct 20, 2010 - 8:46 AM

Thank you reporting the issue. Unfortunately we failed to reproduce it. Could you provide us with the information regarding your OS. Sample project would also be of a great help.

Christopher Herrington Oct 19, 2010 - 6:34 PM

try 


 


Elegant.Ui.MessageBox.Show(frm, "Hello");