Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to position a window with the coord. of a control
Message
De
12/12/2001 15:49:06
 
 
À
12/12/2001 13:57:32
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Divers
Thread ID:
00593421
Message ID:
00593518
Vues:
21
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform