Scrollbars (again)

DavyEFC

Well-known member
Joined
Dec 17, 2010
Messages
51
Programming Experience
5-10
I am missing something simple I guess...

My form shows a graphic that the user can zoom into (using a panel as the scroller) When the user clicks on a different image I want the scrollbars to return to zero position. I am using:
VB.NET:
me.pnlPanel.HorizontalScroll.Value=0
me.pnlPanel.VerticalScroll.Value=0
In this case the horizontal does what its told but the vertical doesn't! If I swap them round then... well whichever comes second does not move.

Am I missing some sort of refresh call?
 
Funny this - I'm developing on a Win7 machine with framework 4, but the target compile is framework 3.5 for WinXP (because thats what our company PCs have at the moment). Testing on the WinXP/3.5 config and the above mentioned code works perfectly... but not on the Win7/4.0
 
I have had this before, and I am trying to find the example in old code..

Have you tried an application.doevents or Me.Refresh between the lines (and after)?
Will let you know if i find the example [but don't hold your breath :s ].
 
Back
Top