Restore Window button

G

Guest

I have been able to remove the Min/Max and Close buttons form my
application's Forms and Reports - but the 'Restore Window' button remains.
I used code supplied by Wayne Gillespie (bless his heart) to remove the
above buttons - but it left the 'Restore Window' button.

Can anybody help me to remove this button from my Forms and Reports?
 
O

OldPro

I have been able to remove the Min/Max and Close buttons form my
application's Forms and Reports - but the 'Restore Window' button remains.
I used code supplied by Wayne Gillespie (bless his heart) to remove the
above buttons - but it left the 'Restore Window' button.

Can anybody help me to remove this button from my Forms and Reports?

There is no easy way to do this. I finally gave up trying.
 
S

Stuart McCall

Glynn said:
I have been able to remove the Min/Max and Close buttons form my
application's Forms and Reports - but the 'Restore Window' button remains.
I used code supplied by Wayne Gillespie (bless his heart) to remove the
above buttons - but it left the 'Restore Window' button.

Can anybody help me to remove this button from my Forms and Reports?

Set the form's ControlBox property to No/False. This removes all 3 buttons
regardless of the Min Max Buttons setting.
 
G

Guest

Thanks Stuart - but no, that does not work for me. I've tried changing the
'ControlBox' to 'NO', but the RESTORE button stubbornly remains in place.
It is a real nuisance, because if the user inadvertently clicks on it, it
reduces/distorts the size of the Form or Report, with no way of getting back
to the original size - except by manually dragging and resizing the screen.
 
S

Stuart McCall

Glynn said:
Thanks Stuart - but no, that does not work for me. I've tried changing
the
'ControlBox' to 'NO', but the RESTORE button stubbornly remains in place.
It is a real nuisance, because if the user inadvertently clicks on it, it
reduces/distorts the size of the Form or Report, with no way of getting
back
to the original size - except by manually dragging and resizing the
screen.

That's odd. It works for me in A97, A2k, A2k2 & A2k3. What can I say?
 
O

OldPro

That's odd. It works for me in A97, A2k, A2k2 & A2k3. What can I say?- Hide quoted text -

- Show quoted text -

It only works when .popup is set to Yes. I set all of my forms as
modal, non pop-up, and call them as dialog boxes (which makes them pop-
up, but doesn't remove the control box). This is the preferred mode
of program design, as it "fixes" some very nasty behaviours in
Access. I don't have to deal with active forms hiding behind inactive
forms every time a user encounters an error. If they do encounter an
error, I can go in and see immediately what the error is and fix it
without having to go through each of my forms and setting popup to
false( the calling function can open forms non-modally too). Also, I
don't have to deal with Microsoft Accesses' every-form-is-a-child
mentality. My users do not need to juggle multiple forms ( and I
don't need the phone calls).
 
S

Stuart McCall

It only works when .popup is set to Yes. I set all of my forms as
modal, non pop-up, and call them as dialog boxes (which makes them pop-
up, but doesn't remove the control box). This is the preferred mode
of program design, as it "fixes" some very nasty behaviours in
Access. I don't have to deal with active forms hiding behind inactive

This is exactly how most of my forms are presented (for the reasons you
mentioned).

I just used A2003 to make a form as described, setting ControlBox to False,
 
O

OldPro

This is exactly how most of my forms are presented (for the reasons you
mentioned).

I just used A2003 to make a form as described, setting ControlBox to False,
then opened it using acDialog - no ControlBox and no buttons. <shrug> I
don't understand this...
It could be because I'm using Access 97... there's no accounting for
progress...
 
S

Stuart McCall

OldPro said:
It could be because I'm using Access 97... there's no accounting for
progress...

Nope, that's not it - I just fired up an old box with A97 on it and tried
the same test. I got no ControlBox and no buttons.

To recap:

I created a new form and set its ControlBox to No and its Modal to Yes
(although this could just as well be No from my tests). I then opened it
from the immediate window specifying acDialog as the WindowMode parameter.

The machine also still has A2.0 installed, so I tried the test with that.
The result was a form with no ControlBox and a disabled close button.

I'm intrigued as to why you (and the OP) are experiencing this problem and
not me.
 
O

OldPro

Nope, that's not it - I just fired up an old box with A97 on it and tried
the same test. I got no ControlBox and no buttons.

To recap:

I created a new form and set its ControlBox to No and its Modal to Yes
(although this could just as well be No from my tests). I then opened it
from the immediate window specifying acDialog as the WindowMode parameter.

The machine also still has A2.0 installed, so I tried the test with that.
The result was a form with no ControlBox and a disabled close button.

I'm intrigued as to why you (and the OP) are experiencing this problem and
not me.- Hide quoted text -

- Show quoted text -

You're right, it isn't the version... it has to do with
docmd.Maximize. Once you call it, the control box comes back. I
wanted to have a main form in a maximized state without the ability to
minimize the form. There are tricks to simulate this, but they are
flakey, and in some cases require calls to the API.
 
S

Stuart McCall

You're right, it isn't the version... it has to do with
docmd.Maximize. Once you call it, the control box comes back. I
wanted to have a main form in a maximized state without the ability to
minimize the form. There are tricks to simulate this, but they are
flakey, and in some cases require calls to the API.

Aahh! Didn't think of trying maximize. That explains a lot.

I have a small module that I wrote to simulate maximize but for Reports
(uses API). But it turns out it works reasonably well for forms too. In fact
if you have a form with no ControlBox and Border set to None, then open it
using acDialog, it opens to the full size of the Access window, covering
Menus, toolbars and the status bar. Access itself must be maximized for this
to work properly (as you said - flakey).

If you or the OP would like to try it, let me know and I'll mail it (I don't
maintain a website any more).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top