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

locking position of form on screen

Status
Not open for further replies.

tania20

Programmer
Oct 30, 2006
148
AU
Hi,

how do I lock a forms position on the screen? my border style is thin and i have set it to autocentre...

Cheers

Tania
 
do you mean locking it or centering it every time it's opened?

locking is automatic, based on when you last save it in design mode, centering it will require custom code...

--------------------
Procrastinate Now!
 
i want to be able to define the postion ont eh screen and disallow the user from being able to click on the border and drag the focused window to a new position
 
You can position your form manually in Design View. You then have to cilck on the Save icon (looks like an floppy disc) then, without doing anything else, exit Design View. When you next open it'll be where you left it! BTW, AutoCenter only centers horizontally, not vertically.

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
i know how to do these things, but this only affects how it appears when they first open the form-they still have the ability to click drag and drop from the border which alters the original position
 
then you will have to set the boder style to none, and mimic a border by drawing it on your form...

you can use the .move method of a form to move it to wherever position on the screen though...

--------------------
Procrastinate Now!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top