this website since the update is slow and stop responding!!! what the **** is wrong? anyways back to your question
i'm not exactly sure what you are asking but have a look at this
Code:
Private XX As Single
Private YY As Single
Private Sub Command1_Click()
Picture1.DrawWidth = 2
Picture1.Line (198, 207)-(198, 207), vbBlack
Screen.MousePointer = vbHourglass
For XX = 1 To Screen.Width
For YY = 1 To Screen.Height
DoEvents
If Picture1.Point(XX, YY) = vbBlack Then
MsgBox XX & " - " & YY
Screen.MousePointer = vbDefault
Exit Sub
End If
Next YY
Next XX
End Sub
Private Sub Command2_Click()
Dim ScreenX As Single
Dim ScreenY As Single
Picture1.BorderStyle = 0
ScreenX = Form1.Left / Screen.TwipsPerPixelX + Picture1.Left + XX
ScreenY = Form1.Top / Screen.TwipsPerPixelY + Picture1.Top + YY
MsgBox "Dot is Placed at." & vbNewLine & "ScreenX (Pixels): " & ScreenX & vbNewLine & "ScreenY (Pixels): " & ScreenY
Picture2.Move ScreenX - (Form1.Left / Screen.TwipsPerPixelX), ScreenY - (Form1.Top / Screen.TwipsPerPixelY), 1, 1
End Sub
click command1 to get coords from picturebox's black dot (takes a couple seconds)
click command2 to get coords from screens then use it to move picture2 position on top on picture1's dot position (to see if coords are right)