Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to position a window with the coord. of a control
Message
From
12/12/2001 15:49:06
 
 
To
12/12/2001 13:57:32
General information
Forum:
Visual Basic
Category:
Other
Miscellaneous
Thread ID:
00593421
Message ID:
00593518
Views:
20
>Hi,
>I have a child window with a textbox. When I press a certain key in that textbox, it pops a small child window. What I want to do is to move that new window beside the textbox. But is there a way to get the coordinates (in the screen) of a control at runtime.
>
>thank you!
>-Michael

I have this code for displaying a calendar control right below a combobox:
nTop = <b>cmbDate.Top + cmbDate.Height</b>
nTop = nTop + Me.Top + 10 '10=offset between control and popup form
frmMonthView.Top = nTop
frmMonthView.Left = Me.Left + <b>cmbDate.Left</b>
frmMonthView.Show vbModal
Should work for a text box too, just replace the control name in the text in bold. Hope this helps.
Previous
Reply
Map
View

Click here to load this message in the networking platform