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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Center Form

Status
Not open for further replies.

mans

Programmer
Mar 18, 2000
136
AU
Hello,

If have a form called form1, I can re-size it whilst it is running using a command (which extends the form width), when it is re-sized what command can I run (straight after the code to re-size it) to re-center the form with it's new extended width.

Thank You
 
on the form resize...

me.left = (screen.width - me.width) / 2
me.top = (screen.height - me.height) / 2
 
Thank you very much webmigit, it worked.
 
a Single line code

me.move (screen.width-me.scalewidth)/2, (screen.height-me.scaleheight)/2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top