Sub Globals Dim x1,y1 Dim maxX,maxY End Sub Sub App_Start Form1.Show drawer.New1("form1",false) bmpMap.New1("pic.jpg") 'Loads the image to a Bitmap object rectDest.New1(5,5,form1.Width-10,form1.Height-10) 'The form's rectangle rectSrc.New1(0,0,rectDest.Width,rectDest.Height) 'The bitmap's rectangle maxX = bmpMap.Width - rectDest.Width maxY = bmpMap.Height - rectDest.Height DrawMap End Sub Sub Form1_MouseDown (x,y) x1 = x y1 = y End Sub Sub Form1_MouseUp (x,y) RectSrc.X = Min(maxX,Max(RectSrc.X - x + x1,0)) 'Checks the bounds and updates the coordinates RectSrc.Y = Min(maxY,Max(RectSrc.Y - y + y1,0)) DrawMap End Sub Sub DrawMap drawer.DrawImage1(bmpMap.Value,rectSrc.Value,rectDest.Value,false) drawer.Refresh2(rectDest.Value) End Sub
Yes, they should be accessible through the HorizontalScroll and VerticalScroll properties of the Panel which are HScrollProperties and VScrollProperties types respectively. If you walk the Docs for Panel you should see them and their members.I had a look at your example. In this case are the LargeChange, SmallChange and Value parameters also accessible and be changed ?
pnl1obj.FromControl("Panel1") pnl1obj.SetProperty("AutoScroll", true) hscrollobj.value = pnl1obj.GetProperty("HorizontalScroll") ' returns an HScrollProperties type hscrollobj.SetProperty("LargeChange", 20)
It's an Autralian one that sustained undercarriage damage on takeoff. They nearly dumped it in the sea but opted to belly it in after lightening it as much as possible. Surprisingly little damage was caused apparently!The landing of the F111 is somewhat risky, isn't it ?
Unfortunately it looks like no .is it possible to add the ValueChanged event to the panel's scrollbars
ActuallyUnfortunately it looks like no
I am afraid that I can't find a way to do that on the device using the scroll bars. However a workaround is to forget about AutoScroll and position the image control on the Panel by setting the Top and Left properties to negative values. If you also want scrollbars then use the ones in ControlsEx and write the code to move the image around.is there an issue to center map on the part that is drawing, whitout any manipulation