|
The abnormal situation in Visio studio 2010 VB.net |
Posted by Sccott on Sep-01-2012 21:46 |
|
Hi,
I got a very strange situation in vb.net.If I cut the WinChartViewer object then paste it in my form again and change noting, the WinChartViewer object will not raise event ViewPortChanged any more. You can try this on FrmZoomScrollTrack form or other form if you want.
This is very strange.Thanks in advance.
br,Sccott |
Re: The abnormal situation in Visio studio 2010 VB.net |
Posted by Peter Kwan on Sep-04-2012 02:11 |
|
Hi Sccott,
I have just tried. In my case, the WinChartViewer object does raise the event normally. For example, after you reconnect the event handler, it will original sample code will still work.
Have you forgot to reconnect the event handlers?
Note that it is normal that you need to reconnect the event handlers. It occurs in all controls, including standard Microsoft controls. For example, if you are using a simple push button control with a click event handler, if you cut it, the paste it, all the handlers will be automatically be disconnected. The event is still raised, but there is no handler for the event, so nothing will occur. You would need to reconnect the click event handler to the control for the event handler to get called.
Regards
Peter Kwan |
Re: The abnormal situation in Visio studio 2010 VB.net |
Posted by Sccott on Sep-04-2012 09:47 |
|
Hi,Peter
Tks. You are right:)
br,Sccott |
|