Screen Coordinates of a Control

  • Thread starter Thread starter ZorpiedoMan
  • Start date Start date
Z

ZorpiedoMan

Help... I need the screen coordinates of a control so I can place a pop
up form underneath it.

--Zorpy
 
Hi,

All controls have the pointtoscreen method

Dim pt As Point

pt = ListBox1.PointToScreen(New Point(0, 0))



Ken

--------------------------

Help... I need the screen coordinates of a control so I can place a pop
up form underneath it.

--Zorpy
 
* ZorpiedoMan said:
Help... I need the screen coordinates of a control so I can place a pop
up form underneath it.

\\\
MsgBox(Me.PointToScreen(Me.Button1.Location).ToString())
///
 
Zorpy,
In addition to Ken & Herfried comments.

Control also has a PointToClient to convert from screen to client
coordinates.

As well as RectangleToClient & RectangleToScreen to convert rectangles
instead of points.

Hope this helps
Jay
 
Back
Top