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

Stop forms from moving 1

Status
Not open for further replies.

faxof

Programmer
Dec 5, 2001
272
GB
I have a little problem with my forms, i can stop users resizing them, i can stop users closing them and i can keep the focus on them, but i can't seem to stop users from moving the form window around. Although the form window is maximised it can still be moved. Even though i have hidden the max, min and close buttons; double clicking on the title bar restores and maximises, while dragging the title bar moves the window, is there any way to stop that happening?
 
You could set the BorderStyle to 'None'. It looks odd, but they won't be able to move the forms. However, there are ways to design the form to make it look less like one of those hairless cats--which is what comes to mind when I see a form without a border.
--Jim
 
Hmmm, you can set the border style to "none". This may do the trick for you. However, you'll probably want to create a rectangle on the form to simulate a border just so it looks pretty. Maq B-)
<insert witty signature here>
 
Maq,
True!...though it took me a bit to get the 'minds' acronym...
--Jim
 
docmd.OpenForm &quot;MyFormName&quot;,,,,,acDialog

Aivars |-0
 
Yes, but acDialog has serious side effects that most often are not desired, I caution against using dialog mode only when that's exactly what's needed. For instance, all other code stops and no other forms are focusable, which, however, is most desirable if you want the dialog form as a homemade input box, but most other times you want any code to continue and other forms to be activatable.
--Jim
 
Dialog form is what faxof, I think: ...stop users closing them and i can keep the focus on them, but i can't seem to stop users from moving the form window around...

Aivars :cool:
 
Thanx Aviars, sorry Jim - dialogue is required.
i just used the border=none in the end - when maximised (with modal & pop up) on a flat panel monitor it looks wicked!
 
faxof,
Understood...I wasn't trying to be disagreeable, just warning about the oft-overlooked coding peculiarities of the acDialog mode vs. modal, popup or normal modes.
--Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top