1: Attribute VB_Name = "Module1" 2: Sub Locate(Y, X, Where As PictureBox) 3: Where.CurrentX = (X - 1) * (10 * Screen.TwipsPerPixelX) 4: Where.CurrentY = (Y - 1) * (10 * Screen.TwipsPerPixelY) 5: End Sub 6: 7: Function CSRLIN(Where As PictureBox) 8: CSRLIN = CInt(Where.CurrentY / (Screen.TwipsPerPixelY * 10)) + 1 9: End Function 10: Function POS(Where As PictureBox) 11: POS = CInt(Where.CurrentX / (Screen.TwipsPerPixelX * 10)) + 1 12: End Function |