AccessTr.neT

Tam Versiyon: Formda Belli Bir Yeri Tıklama Simülasyonu
Şu anda arşiv modunu görüntülemektesiniz. Tam versiyonu görüntülemek için buraya tıklayınız.
Alıntı:
http://www.utteraccess.com/forum/x-y-mou...23895.html


In a Module:
******************************************

Option Compare Database
Option Explicit
Public Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Public Type POINTAPI
X As Long
Y As Long
End Type
Public Function GetX() As Long
Dim n As POINTAPI
GetCursorPos n
GetX = n.X
End Function
Public Function GetY() As Long
Dim n As POINTAPI
GetCursorPos n
GetY = n.Y
End Function

******************************************
Then, this in the form's code:
*****************************************


Private Sub ImageFrame_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.txtMouseX = X / 15
Me.txtMouseY = Y / 15
End Sub
Private Sub ImageFrame_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.txtMouseX2 = X / 15
Me.txtMouseY2 = Y / 15
End Sub

******************************************