Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to open a picture in a form and with a mouse click
output the position of the mouse pointer within the picture, i.e. the verticle and horizontal pixel. The part I don't have is accessing the position of the mouse. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is how to get the cursor position
Private Declare Function GetCursorPos Lib "user32" _ (lpPoint As POINTAPI) As Long Private Type POINTAPI x As Long y As Long End Type End Sub Public Function GetPos() As Long Dim pPosition As POINTAPI Dim lReturn As Long On Error Resume Next lReturn = GetCursorPos(pPosition) Application.StatusBar = "x co-ordinate: " & pPosition.x & ", y co-ordinate: " & pPosition.y End Function -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "ksel" wrote in message ... I want to open a picture in a form and with a mouse click output the position of the mouse pointer within the picture, i.e. the verticle and horizontal pixel. The part I don't have is accessing the position of the mouse. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Spurious End Sub in there, should be
Private Declare Function GetCursorPos Lib "user32" _ (lpPoint As POINTAPI) As Long Private Type POINTAPI x As Long y As Long End Type Public Function GetPos() As Long Dim pPosition As POINTAPI Dim lReturn As Long On Error Resume Next lReturn = GetCursorPos(pPosition) Application.StatusBar = "x co-ordinate: " & pPosition.x & ", y co-ordinate: " & pPosition.y End Function -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Bob Phillips" wrote in message ... This is how to get the cursor position Private Declare Function GetCursorPos Lib "user32" _ (lpPoint As POINTAPI) As Long Private Type POINTAPI x As Long y As Long End Type End Sub Public Function GetPos() As Long Dim pPosition As POINTAPI Dim lReturn As Long On Error Resume Next lReturn = GetCursorPos(pPosition) Application.StatusBar = "x co-ordinate: " & pPosition.x & ", y co-ordinate: " & pPosition.y End Function -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "ksel" wrote in message ... I want to open a picture in a form and with a mouse click output the position of the mouse pointer within the picture, i.e. the verticle and horizontal pixel. The part I don't have is accessing the position of the mouse. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks, this really works.
-----Original Message----- This is how to get the cursor position Private Declare Function GetCursorPos Lib "user32" _ (lpPoint As POINTAPI) As Long Private Type POINTAPI x As Long y As Long End Type End Sub Public Function GetPos() As Long Dim pPosition As POINTAPI Dim lReturn As Long On Error Resume Next lReturn = GetCursorPos(pPosition) Application.StatusBar = "x co-ordinate: " & pPosition.x & ", y co-ordinate: " & pPosition.y End Function -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "ksel" wrote in message ... I want to open a picture in a form and with a mouse click output the position of the mouse pointer within the picture, i.e. the verticle and horizontal pixel. The part I don't have is accessing the position of the mouse. . |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Of course it does<vbg
Bob "ksel" wrote in message ... Thanks, this really works. -----Original Message----- This is how to get the cursor position Private Declare Function GetCursorPos Lib "user32" _ (lpPoint As POINTAPI) As Long Private Type POINTAPI x As Long y As Long End Type End Sub Public Function GetPos() As Long Dim pPosition As POINTAPI Dim lReturn As Long On Error Resume Next lReturn = GetCursorPos(pPosition) Application.StatusBar = "x co-ordinate: " & pPosition.x & ", y co-ordinate: " & pPosition.y End Function -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "ksel" wrote in message ... I want to open a picture in a form and with a mouse click output the position of the mouse pointer within the picture, i.e. the verticle and horizontal pixel. The part I don't have is accessing the position of the mouse. . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
enter bitmap image pixel data to cells | New Users to Excel | |||
HOW DO I ADJUST ROW HEIGHT BY PIXEL? | Setting up and Configuration of Excel | |||
How do I change chart cell from pixel to inch? | Charts and Charting in Excel | |||
with same font and pixel number different column width | Setting up and Configuration of Excel | |||
Extract Pixel Values to Excel? | Excel Worksheet Functions |