Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Problem : MessageBox Show and DiagramView (Read 2827 times)
SiConsulting Matteo
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 7
Joined: Jun 10th, 2020
Problem : MessageBox Show and DiagramView
Jun 30th, 2020 at 2:05pm
Print Post  
Hi,

I have a problem with library, I should show a messagebox  when I click a button in my form. The problem is that this warning is below my form and my diagramview.
Instead:
Code
Select All
diagramView1.Hide();
MessageBox.Show("Pluto", "Output");
diagramView1.Show();
 



I try this and it is right behaviour but I want see also the diagram when I see this warning.

How could I do?

  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3435
Joined: Oct 19th, 2005
Re: Problem : MessageBox Show and DiagramView
Reply #1 - Jun 30th, 2020 at 4:44pm
Print Post  
Hi,

I can imagine this happening if your diagram view is in a different form than the one displaying the message box. In such case try setting it as box' owner -

Code
Select All
MessageBox.Show(diagramView1.Parent, "...", "...");
// or maybe MessageBox.Show(diagramView1, "...", "...");
 



Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
SiConsulting Matteo
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 7
Joined: Jun 10th, 2020
Re: Problem : MessageBox Show and DiagramView
Reply #2 - Jul 1st, 2020 at 8:10am
Print Post  
I tried this but It is not working.

If I don't draw the node it is right behavior instead if in my diagram exists a node, It is not working the messagebox is drawed below my form.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3435
Joined: Oct 19th, 2005
Re: Problem : MessageBox Show and DiagramView
Reply #3 - Jul 1st, 2020 at 9:01am
Print Post  
There are plenty of message boxes shown by diagram's sample projects, e.g. Floorplan Designer's 'door must be dropped on wall' message - don't these show on your system? MessageBox being a top-level window should not be able to hide behind a child DiagramView of a form while still on top of the form. So you either have multiple forms and diagram's one activates while drawing the node, or otherwise there is some strange top-most flag set on the single form. If using ControlNodes, see if hosted control isn't creating a topmost HWNDs in addition to the child control. You could use WinSDK's Spy++ tool to check both.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint