473,569 Members | 2,870 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Screen Coordinates of a Control

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

--Zorpy

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #1
3 5743
Hi,

All controls have the pointtoscreen method

Dim pt As Point

pt = ListBox1.PointT oScreen(New Point(0, 0))

Ken

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

"ZorpiedoMa n" <No********@Bea tles.com> wrote in message
news:O%******** *******@TK2MSFT NGP11.phx.gbl.. .
Help... I need the screen coordinates of a control so I can place a pop
up form underneath it.

--Zorpy

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #2
* ZorpiedoMan <No********@Bea tles.com> scripsit:
Help... I need the screen coordinates of a control so I can place a pop
up form underneath it.


\\\
MsgBox(Me.Point ToScreen(Me.But ton1.Location). ToString())
///

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #3
Zorpy,
In addition to Ken & Herfried comments.

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

As well as RectangleToClie nt & RectangleToScre en to convert rectangles
instead of points.

Hope this helps
Jay

"ZorpiedoMa n" <No********@Bea tles.com> wrote in message
news:O%******** *******@TK2MSFT NGP11.phx.gbl.. .
Help... I need the screen coordinates of a control so I can place a pop
up form underneath it.

--Zorpy

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1736
by: Dan | last post by:
Hi. I want to be able to use the ListView::GetItemAt function from within the ListView's DragDrop event callback. My problem is that GetItemAt requires screen-space coordinates, and the DragEventArgs gives me the drop coordinates in control relative space. Is there an easier way than iterating up the parent hierarchy? Cheers for any...
2
4564
by: Dan Sikorsky | last post by:
How do you get the x,y pixel location of a textbox so that you can position the Web Date Control popup nearby the associated textbox that will contain the date selected by the Web Date Control? -- Thank you kindly, Dan Sikorsky BAB, BScE, MSC
1
1680
by: zoneal | last post by:
OS: Win XP Language: VB.net or C# I have a program where I need to launch 2 separate instances of an App called "Main.exe". Each instance will need to be piped to there own video display. Both displays need to be running at a screen resolution of 640x480. I am able to force to screen resolution of the display that the app is
1
1799
by: Udi | last post by:
Hi, I have a listbox and a textbox that are built and shown dynamically. My problem is that their positions and sizes may cause them to be displayed out of the their parent form bounds, and in a worse case out of the screen bounds. 1. How do I make sure my controls will always be displayed inside the screen? 2. How do I set a control as...
3
5381
by: steve | last post by:
Hi All I have textboxes within a TableLayoutpanel and I want to be able to position an independant control adjacent to a selected textbox This independent control allows selection of text to insert into the textbox I am having trouble achieving this, see code below, the x position is too far to the right and the y position is close to...
1
27016
by: Simon Verona | last post by:
I have a usercontrol which when entered pops up a form. I want the form to be aligned with the bottom edge of the user control. I was doing this by passing the usercontrol into the form as a parameter and using the left and top properties to find the location on the screen to position the form. However, these are relative to the container...
1
5809
by: Sagaert Johan | last post by:
Hi Are there any classes that allow conversion of mouse coordiinates (relative to the container coords) to screen coordinates ?
3
1470
by: Peter Oliphant | last post by:
I'm programming using MS VS VC++ 2008 Express (Beta 2) in /Cli pure mode. I've found the Screen class. With it I can very easily get the count and all the data on the various Screens attached to a system, whether it be a single screen or multiple screen system. I believe the FromControl method of the Screen class can be used to determine...
0
8914
by: raylopez99 | last post by:
keywords: logical coordinates, page coordinates, world coordinates, device coordinates, physical coordinates, screen coordinates, client coordinates. offset rectangle. WYSIWYG rubber rectangle problem, bounded rectangle problem. PointToClient, PointToScreen Beware this newbie trap for the unwary. It goes by various names (in some old...
0
7917
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8118
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7665
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7962
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6277
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5217
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2105
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1207
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.