Results 1 to 9 of 9
  1. #1
    Join Date
    Sep 2002
    Posts
    18

    Question Unanswered: Unable to kill restore window button on form

    Hi, All!

    Upon opening my database, I have a form that opens that is set to maximize on activate, which it does; and I need it to stay that way, which it does.

    Control freak that I am, I want the user to have only the options of clicking on the buttons that I provide in the form or of closing the database, so I have stripped all other possibilities from the form.

    However, there is this pesky Restore Window button that screws up the view when clicked, and I can't determine how to get rid of it.

    I can't make this form a pop-up, as it must remain open behind other forms and reports that are opened from it.

    Help has been of no use to me here. Any ideas?

    By the way, I'm working with 2000, if it matters.

    Thanks in advance!

    sykayda

  2. #2
    Join Date
    Oct 2002
    Location
    Rochester, NY
    Posts
    84

    Re: Unable to kill restore window button on form

    Originally posted by sykayda
    Hi, All!

    Upon opening my database, I have a form that opens that is set to maximize on activate, which it does; and I need it to stay that way, which it does.

    Control freak that I am, I want the user to have only the options of clicking on the buttons that I provide in the form or of closing the database, so I have stripped all other possibilities from the form.

    However, there is this pesky Restore Window button that screws up the view when clicked, and I can't determine how to get rid of it.

    I can't make this form a pop-up, as it must remain open behind other forms and reports that are opened from it.

    Help has been of no use to me here. Any ideas?

    By the way, I'm working with 2000, if it matters.

    Thanks in advance!

    sykayda
    Is the "Restore Window" button you're referring to in the little box on the upper right corner of the form's window? If so, open the form in design mode and view the properties of the form. On the Format Tab will be three properties called: Control Box, Min Max Buttons, and Close Button. Set them to No, None, and No respectively and they can't do anything with the window. They will need to use the database window to enter the form in design mode to close it - keep this in mind with other startup settings you have. Someday you may need to kill the application, so leave the bypass (using SHIFT on startup) key enabled, but don't tell anyone.
    Regards,
    Terry

  3. #3
    Join Date
    Sep 2002
    Posts
    18
    Hi, Terry!

    Yes, the Restore Window button that I refer to is the button in the upper right corner of the grey menu bar of the form’s window. When the window is maximized, it replaces the Maximize button.

    I have disabled the Min and Max buttons as well as the Close button and the Control Box. One would think that by disabling those, the restore button would then be disabled as well, but that isn’t the case, the Restore button is there as long as the window is maximized.

    The form opens on opening the database, and the users can close out of the database or click on the options I give them, and, at the moment, that stubborn Restore button is still there, and they have the option of clicking it. In which case, the grey menu bar which contains the restore button disappears, as well as the button itself, and it shrinks the form to whatever size it is in design view, leaving grey background around the edges of it, or causing scrollbars to appear, if it is large enough. This happens regardless of the fact that I have put the docmd.maximize in the on activate event.

    As for leaving the bypass (shift on Startup), I have done that, and all are fortunately more clueless than I was, ‘cause that’s how I learned Access - sneaking in when no one was looking and playing with the databases. Then again, maybe they’re all just afraid of me…

    Thanks!

  4. #4
    Join Date
    Oct 2002
    Location
    Rochester, NY
    Posts
    84
    Originally posted by sykayda
    Hi, Terry!

    Yes, the Restore Window button that I refer to is the button in the upper right corner of the grey menu bar of the form’s window. When the window is maximized, it replaces the Maximize button.

    I have disabled the Min and Max buttons as well as the Close button and the Control Box. One would think that by disabling those, the restore button would then be disabled as well, but that isn’t the case, the Restore button is there as long as the window is maximized.

    The form opens on opening the database, and the users can close out of the database or click on the options I give them, and, at the moment, that stubborn Restore button is still there, and they have the option of clicking it. In which case, the grey menu bar which contains the restore button disappears, as well as the button itself, and it shrinks the form to whatever size it is in design view, leaving grey background around the edges of it, or causing scrollbars to appear, if it is large enough. This happens regardless of the fact that I have put the docmd.maximize in the on activate event.

    As for leaving the bypass (shift on Startup), I have done that, and all are fortunately more clueless than I was, ‘cause that’s how I learned Access - sneaking in when no one was looking and playing with the databases. Then again, maybe they’re all just afraid of me…

    Thanks!
    That's odd ... I have almost the exact situation you describe in the application I'm developing. I have a switchboard that controls navigation through various parts of the application and causes the database to be closed when the user decides it's time to go. I don't allow the users to see the database window or any of the menus. I set the properties I told you about for my switchboard and there are NO controls available - that's why I told you the part about the shortcut key and using the database window to close the form. By doing so, I have none of the sizing or exit controls you're seeing.

    Do you have any properties set like Modal or Pop-up?
    Regards,
    Terry

  5. #5
    Join Date
    Sep 2002
    Posts
    18
    Hmm. Odd, indeed…

    Pop-up and Modal are both set to No. I set the Menu Bar to =-1, which was the only way I found to get rid of the menu bars. Perhaps there is another way, and this isn’t the best way, possibly causing the Restore button issue?

    One way to get around the whole thing is to set the border to None, then in design view, play around until you get the window to fill the screen space in form view, which is a hassle, and imperfect. For one thing, if it’s a little too small, there is grey background all around; too large, and you’ve got scroll bars.

    Beyond that, from this form, the user can open Form2, (which I have maximized using the Activate event) and from that form they choose to open one of several reports (which, again, I have maximize using the On Open event). When the user closes the report, they go back to Form2, and if they choose to exit that form, they go to the initial form. The initial form behaves as if someone had clicked the Restore button: the menu bar disappears, and the form shifts position, causing the grey background to appear around some of the sides, and scroll bars appear.

    Someone in another forum pointed me to code for a function that gets around using Docmd.Maximize. It does eliminate the Restore button, but it behaves as I described just above with setting the border to None. (Interesting that the code was a solution to the Close button appearing despite the property being disabled. It was noted that this commonly occurs with maximized forms.)

    I wouldn’t be spending so much time on this, but it’s been an issue in other projects, and having to build in a less than satisfactory manner just bugs me. I want it clean and simple for myself and the other users.

    If I don’t come up with the answer now, I’ll get it eventually. I’d just rather sooner than later.

    I appreciate the time and thought you’ve given to this.

    sykayda

  6. #6
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    33
    Basically as long as your window=form is MAXIMIZED it will alwas display these buttons no matter what properties you set.
    Here is a quote from Mictosoft:
    "CAUSE
    Microsoft Access is a multiple document interface (MDI) application. The default behavior for an MDI application is for all maximized child windows to always display a Control-menu box and a Restore button. "

    The solution is NOT to maximize form but rather use windows functions to stretch your window to all avaliable workspace.

    Sorry for being maybe too brief, the matter is dicussed in detail in:
    http://support.microsoft.com/default...b;en-us;128196

  7. #7
    Join Date
    Oct 2002
    Location
    Rochester, NY
    Posts
    84
    Originally posted by Alec
    Basically as long as your window=form is MAXIMIZED it will alwas display these buttons no matter what properties you set.
    Here is a quote from Mictosoft:
    "CAUSE
    Microsoft Access is a multiple document interface (MDI) application. The default behavior for an MDI application is for all maximized child windows to always display a Control-menu box and a Restore button. "

    The solution is NOT to maximize form but rather use windows functions to stretch your window to all avaliable workspace.

    Sorry for being maybe too brief, the matter is dicussed in detail in:
    http://support.microsoft.com/default...b;en-us;128196
    Alec,
    Thanks for the article reference. I'll go check it out ASAP. I guess the only difference between my switchboard form (which is supposed to function exactly like Sykayda's) and Sykayda's is that I'm not maximizing it. I can understand that you want a form to completely fill the Access window and you never really know how big it will be. I usually size my switchboard to be as large as my largest form, set the auto-resize and auto-center properties to no, and move the upper left corner to the upper left corner of the Access window. I then click save and close the form. If any users start getting scroll bars, I tell them to resize the Access window. This doesn't always solve the problem, especially when people have monitors set at lower screen resolutions. The article refence you provided may be a clean way to solve the whole mess. Thanks!
    Regards,
    Terry

  8. #8
    Join Date
    Sep 2002
    Posts
    18
    Thanks for the information, Alec. You're response wasn't too brief; it gave me more to work with. I'm loathe to slog through the MS knowledge base, since I've spent lots of time over the years with many times too little to show for it. So thanks for supplying the link.

    And thanks again to you, too, Terry!

    sykayda

  9. #9
    Join Date
    Sep 2002
    Posts
    18
    I've been meaning to post how I solved my problem, but I've been swamped. Still, late though it is, I thought it might help someone someday.

    My objective was to eliminate all toolbars and buttons that were not of my creation on a certain form (I'll call it MyForm), and I wanted MyForm maximized at all times that it would be open.

    Setting MyForm as a pop-up, the border to none, disabling scrollbars and the like, and maximizing on open was a solution, except for the fact that MyForm would remain in front of any forms or reports that I opened from it. I didn't want to keep closing and opening MyForm, either.

    The answer I arrived at was to make MyForm a pop-up, as I described, and then set it to not visible (Forms!MyForm.Visible = False) on the On Open event of the report or form I was opening from MyForm. Then, on the On Close event of the form or report, I set MyForm to visible again.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •