Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help ! How to centralised a control ?

Status
Not open for further replies.

hiptino

Programmer
May 27, 2000
18
0
0
NG
My application uses a control to accept input from users.
The control is centralised on a 14" monitor, but appears on a far left corner of the screen on 15" monitor, and different point on 17" .

How do I centralise this control to maintain the same position on whichever vga monitor it appears.
 
It depends which control you use to get the user input.
One way would be to use the Inputbox control. When you use this control you may specify the location of the inputbox at runtime which you can do with absolute form coordinates or in distance proportional to the form size.
If you use another type of control you can specify the following to place the control in the middle of any form.
ctl.top=0.5*(me.height-ctl.height)
ctl.left=0.5*(me.width-ctl.width)


PK Odendaal
pko@mweb.co.za

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top