Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Problem when closing MessageBox (Read 2584 times)
gamesmeister
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 14
Joined: Aug 2nd, 2006
Problem when closing MessageBox
Nov 21st, 2006 at 9:06pm
Print Post  
Hi,

I have a window with a flowchart in one panel, and a user control in the other. On the edit boxes on the User Control, I have a leave event to validate the text entered. An invalid entry causes a message box to appear.

If I happen to click on the flowchart to trigger the above leave event, when I clear the MessageBox the flowChart seems to think I am holding the mouse down, and starts dragging across the flowchart.

Any idea what might be causing this?

Many thanks
Gerry
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Problem when closing MessageBox
Reply #1 - Nov 22nd, 2006 at 6:18am
Print Post  
Hi,

May be the flowchart has already started drawing upon MouseDown, and cannot detect the MouseUp event when you show the message box so drawing does not stop. Try setting Behavior = DoNothing before showing the message box, then the drawing should stop.

Stoyan
  
Back to top
 
IP Logged
 
gamesmeister
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 14
Joined: Aug 2nd, 2006
Re: Problem when closing MessageBox
Reply #2 - Nov 22nd, 2006 at 8:44am
Print Post  
I tried the following:

this.flowChart1.Behavior = MindFusion.FlowChartX.EBehavior.bhDoNothing;
MessageBox.Show(exc.Message, "Invalid Value", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
this.flowChart1.Behavior = MindFusion.FlowChartX.EBehavior.bhModify;


but this didn't make any difference.

I then moved the last statement to the MouseUp event on the flowChart, but this has strange results. The change of the behaviour seems to work ok, but something fired by the MouseUp event then causes a null exception, which doesn't seem to be caused by any of my application events.

The Source of the exception states: "FlowChart.NET", and the StackTrace has the following:
"   at MindFusion.FlowChartX.FlowChart.OnMouseUp(MouseEventArgs e)\r\n   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)\r\n   at System.Windows.Forms.Control.WndProc(Message& m)\r\n   at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)\r\n   at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)\r\n   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)\r\n   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)\r\n   at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+I
MsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)\r\n   at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)\r\n   at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)\r\n   at System.Windows.Forms.Application.Run(Form mainForm)\r\n   at myApp.Forms.Form1.Main()"

Any help greatly appreciated

Thanks
Gerry
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Problem when closing MessageBox
Reply #3 - Nov 22nd, 2006 at 9:19am
Print Post  
I don't get it with the latest version, but anyway try to restore the original Behavior on the next MouseDown - that should work from there.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint