Guest User

Untitled

a guest
Jun 21st, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. picturebox1 name = PictOuter
  2. picturebox2 name = PictInner
  3.  
  4. Dim pos As String
  5. Dim bos As String
  6.  
  7. pos = Format(x / PictOuter.Width * 100, "0")
  8. bos = Format(y / PictOuter.Height * 100, "0")
  9.  
  10. PictInner.Left = PictOuter.Width * pos / 100
  11. PictInner.Top = PictOuter.Height * bos / 100
  12. PictInner.Visible = True
  13.  
  14. Private Sub PictOuter_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  15.  
  16. PictInner.Left = X
  17. PictInner.Top = Y
  18.  
  19. End Sub
Add Comment
Please, Sign In to add comment