|
With two PictureBox controls, first add a PictureBox control Picture1 to the form, and then use the mouse to load another PictureBox control Picture2 in the middle of Picture1.
Add a HScroll control to the body or in Picture1 to adjust the height of Picture2.
It is recommended not to use the vertical scroll bar at the same time as the horizontal scroll bar, as it will report an error or crash.
code show as below:
Private Sub Form_Load()
Me.Height = 11295
Me.Width = 15360
Picture1.Width = Me.Width-400
'Picture2.Height = Picture1.Height
Picture2.Width = Picture1.Width * 2.1'The magnification can be adjusted
End Sub
Private Sub HScroll1_Change()
Picture2.Left = -HScroll1 * 1.4 / 2.8' magnification needs to be adjusted
End Sub |
|