Disable close button on maximized forms 
Author Message
 Disable close button on maximized forms

Hi,

I have a mainform which contains another form.
When the mainform is loaded I want it to be maximized.
This can be done by Docmd.Maximize. I have set the properties of the form so
that no max or min buttons or systemmenu buttons are available.
But ... when the form is maximized, those controls (minimize, maximize) ar
still visible.

So I visited The Access Web and read this article :
http://www.*-*-*.com/

Does anyone knows how to call the sub: MaximizeRestoredForm(form)
I have tried several things but get errors:

frmHoofdscherm is the name of the mainform.

MaximizeRestoredForm (frmHoofdscherm)  --> error!

or

dim frm as form
frm = screen.activeform
MaximizeRestoredForm (frm)

But here it says that the active form doesn't have the focus.
So I tried to Me.form.setfocus, but that wont help.

DOES ANYONE KNOW HOW TO CALL THE SUB MaximizeRestoredForm CORRECTLY ???

Patrick



Mon, 30 Sep 2002 03:00:00 GMT  
 Disable close button on maximized forms
Hi Spiderman
Have you tried MaximizeRestoredForm(Me.Form) or
MaximizeRestoredForm(Forms!frmHoofdscherm) or
MaximizeRestoredForm(Form_frmHoofdscherm)?
I think one of those should work.
hth
Dan
Quote:

> Hi,

> I have a mainform which contains another form.
> When the mainform is loaded I want it to be maximized.
> This can be done by Docmd.Maximize. I have set the properties of the form so
> that no max or min buttons or systemmenu buttons are available.
> But ... when the form is maximized, those controls (minimize, maximize) ar
> still visible.

> So I visited The Access Web and read this article :
> http://www.mvps.org/access/api/api0022.htm

> Does anyone knows how to call the sub: MaximizeRestoredForm(form)
> I have tried several things but get errors:

> frmHoofdscherm is the name of the mainform.

> MaximizeRestoredForm (frmHoofdscherm)  --> error!

> or

> dim frm as form
> frm = screen.activeform
> MaximizeRestoredForm (frm)

> But here it says that the active form doesn't have the focus.
> So I tried to Me.form.setfocus, but that wont help.

> DOES ANYONE KNOW HOW TO CALL THE SUB MaximizeRestoredForm CORRECTLY ???

> Patrick



Mon, 30 Sep 2002 03:00:00 GMT  
 Disable close button on maximized forms
Yes I did.
But an error saying that the types don't match appears.

Spidey


Quote:
> Hi Spiderman
> Have you tried MaximizeRestoredForm(Me.Form) or
> MaximizeRestoredForm(Forms!frmHoofdscherm) or
> MaximizeRestoredForm(Form_frmHoofdscherm)?
> I think one of those should work.
> hth
> Dan


> > Hi,

> > I have a mainform which contains another form.
> > When the mainform is loaded I want it to be maximized.
> > This can be done by Docmd.Maximize. I have set the properties of the
form so
> > that no max or min buttons or systemmenu buttons are available.
> > But ... when the form is maximized, those controls (minimize, maximize)
ar
> > still visible.

> > So I visited The Access Web and read this article :
> > http://www.mvps.org/access/api/api0022.htm

> > Does anyone knows how to call the sub: MaximizeRestoredForm(form)
> > I have tried several things but get errors:

> > frmHoofdscherm is the name of the mainform.

> > MaximizeRestoredForm (frmHoofdscherm)  --> error!

> > or

> > dim frm as form
> > frm = screen.activeform
> > MaximizeRestoredForm (frm)

> > But here it says that the active form doesn't have the focus.
> > So I tried to Me.form.setfocus, but that wont help.

> > DOES ANYONE KNOW HOW TO CALL THE SUB MaximizeRestoredForm CORRECTLY ???

> > Patrick



Mon, 30 Sep 2002 03:00:00 GMT  
 Disable close button on maximized forms
Well, the answer seems to be leave out the brackets.
MaximizeRestoredForm Me.Form
Dan
Quote:

> Yes I did.
> But an error saying that the types don't match appears.

> Spidey



> > Hi Spiderman
> > Have you tried MaximizeRestoredForm(Me.Form) or
> > MaximizeRestoredForm(Forms!frmHoofdscherm) or
> > MaximizeRestoredForm(Form_frmHoofdscherm)?
> > I think one of those should work.
> > hth
> > Dan


> > > Hi,

> > > I have a mainform which contains another form.
> > > When the mainform is loaded I want it to be maximized.
> > > This can be done by Docmd.Maximize. I have set the properties of the
> form so
> > > that no max or min buttons or systemmenu buttons are available.
> > > But ... when the form is maximized, those controls (minimize, maximize)
> ar
> > > still visible.

> > > So I visited The Access Web and read this article :
> > > http://www.mvps.org/access/api/api0022.htm

> > > Does anyone knows how to call the sub: MaximizeRestoredForm(form)
> > > I have tried several things but get errors:

> > > frmHoofdscherm is the name of the mainform.

> > > MaximizeRestoredForm (frmHoofdscherm)  --> error!

> > > or

> > > dim frm as form
> > > frm = screen.activeform
> > > MaximizeRestoredForm (frm)

> > > But here it says that the active form doesn't have the focus.
> > > So I tried to Me.form.setfocus, but that wont help.

> > > DOES ANYONE KNOW HOW TO CALL THE SUB MaximizeRestoredForm CORRECTLY ???

> > > Patrick



Mon, 30 Sep 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Disabling close button on maximized form - How?

2. How Disable close button on maximized form?

3. Disable Close, Restore Buttons on Maximized Form

4. How to hide the maximize/restore and close-button on a maximized form

5. How to hide the maximize/restore and close-button on a maximized form

6. Disable Access Close Button not Form Close Button?

7. How to disable the Minimize, Maximize and Close buttons

8. DISABLE close button when MAXIMIZE?

9. DISABLE close button when MAXIMIZE?

10. Disable the close button when maximized


 
Powered by phpBB® Forum Software © phpBB Group