Disable Double-click in title bar Form

Cris

Registered User.
Local time
Today, 12:19
Joined
Jun 10, 2009
Messages
35
I want to disable the double click in the title bar of Forms, I don't want users to be able of resizing the window, Control buttons are disable but I can't find any property to disable this function.

Thanks
 
You can change the Border Style property of the form to Dialog.
 
I tried your suggestion but it doesn't work :( I tried the four options indeed.

Maybe I have to say that when I open this form I run a command in vba to maximize it.

Docmd.Maximize

I want the form remind like this so I do not want users to be able to double click the title bar.

Thanks
 
You could use a border style of NONE but I don't think that would go well with other stuff you probably want.

You could also get the form size after the DoCmd.Maximize and save those to a variable and then in the form's Resize event you can just set the dimensions using MoveSize to be those dimensions. So, if anyone tries a resize it will just keep it at the specified limits.
 
SOS, thanks for your reply.

I had tryied before in the Resize event to run the Docm.Maximize, that works but I was asked to change that because it shows the window to minimize and then maximize again.

On the other hand, I would like to try your suggestion to see if that can work better, but I am not sure about the MoveSize that you are talking about, I tried with the Move member of the Form but I was not able to see any change, Besides I could save the width of the windows but not the height.

I appreciate yours and other suggestions.

Thanks
 
For the form dimensions you can collect and set the InsideHeight and InsideWidth directly.

So, on open you can get

Me.InsideWidth

and Me.InsideHeight

As for it minimizing and then maximizing - did you remove the min/max buttons from the form so nobody can touch them? That should help some.
 
SOS :

Thanks for your reply. I tried to programm your suggestion getting the size of the window. The problem is that my windows has its property to a pop - up windows because i need it to overloap the access windows. That's the purpose of the maximize function. So, the problem is that the height and width that I am obtained are not the ones for the completed screen, but the ones to fit as and sub windows inside of access. So :( finally it doesn't work.

All the control buttons are disable. The only proble is the double click in the title bar I need to disable this function.

Thanks
 
When the form is first opened you need to pass the dimensions to variables then on the Resize event of the form set the dimensions back to the orginal ones thus forcing it back to its orignal size.

David
 

Users who are viewing this thread

Back
Top Bottom