By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,224 Members | 1,143 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,224 IT Pros & Developers. It's quick & easy.

How can i remove the mimize window

P: n/a
How can I remove the three buttons on the upper right corner in the
database ? These three buttons are called "minimize" "restoredown"and
"close". With the command
Application.CommandBars("Menu bar").Enabled = False

With the help of the above command remove all the buttons and the
screen is clear of them, but these three buttons remain on the right
upper corner. Is there any command with which to remove them by
code ?
In the design view of the form i have put No to the properties
ControlBox,MinMax button
and CloseButton but these buttons persist to stay at the upper right
corner of the screen. perhaps they are tied up not with Acces but with
Windows ?

Aug 13 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
On the form properties, in the OTHER tab there are two properties:
popup and modal. Play with them.

Christian

Aug 13 '07 #2

P: n/a
Also, in form properties on the format tab look at "Min Max Buttons"
and "Close Button".

Aug 13 '07 #3

P: n/a
solar - here is an article about 'trapping' and disabling the x that
closes access:
http://www.mvps.org/access/general/gen0005.htm

And if you want to make it go away completely, here is the code that I
use, that I got from this newsgroup - (I use it in Access 2002, with XP.
I'm not sure if it will work with new stuff like vista and 2007):

'\***BEGIN CODE***\
Private Declare Function GetSystemMenu Lib "user32" (ByVal hWnd As Long, _
ByVal bRevert As Long) As Long
Private Declare Function RemoveMenu Lib "user32" (ByVal hMenu As Long, _
ByVal nPosition As Long, ByVal wFlags As Long) As Long

Function fNoExitBtn(lngHWind As Long)
'\(c)silba,040899\vs.01.02\rev060100\
On Error Resume Next
Dim lngSysMenu As Long
Dim lngRes As Long
Const MF_BYPOSITION = &H400

lngSysMenu = GetSystemMenu(lngHWind, 0)
lngRes = RemoveMenu(lngSysMenu, 6, MF_BYPOSITION)
End Function

'when you want to hide the close button, you call the function like this:

fNoExitBtn(hWndAccessApp)

-hope this helps
-John

solar wrote:
How can I remove the three buttons on the upper right corner in the
database ? These three buttons are called "minimize" "restoredown"and
"close". With the command
Application.CommandBars("Menu bar").Enabled = False

With the help of the above command remove all the buttons and the
screen is clear of them, but these three buttons remain on the right
upper corner. Is there any command with which to remove them by
code ?
In the design view of the form i have put No to the properties
ControlBox,MinMax button
and CloseButton but these buttons persist to stay at the upper right
corner of the screen. perhaps they are tied up not with Acces but with
Windows ?
Aug 13 '07 #4

P: n/a
Oops, I should have paid closer attention. I didn't realize he was
talking about the db window. Sorry.

Aug 13 '07 #5

P: n/a
On 13 , 21:56, John Welch <so...@nospam.comwrote:
solar - here is an article about 'trapping' and disabling the x that
closes access:http://www.mvps.org/access/general/gen0005.htm

And if you want to make it go away completely, here is the code that I
use, that I got from this newsgroup - (I use it in Access 2002, with XP.
I'm not sure if it will work with new stuff like vista and 2007):

'\***BEGIN CODE***\
Private Declare Function GetSystemMenu Lib "user32" (ByVal hWnd As Long, _
ByVal bRevert As Long) As Long
Private Declare Function RemoveMenu Lib "user32" (ByVal hMenu As Long, _
ByVal nPosition As Long, ByVal wFlags As Long) As Long

Function fNoExitBtn(lngHWind As Long)
'\(c)silba,040899\vs.01.02\rev060100\
On Error Resume Next
Dim lngSysMenu As Long
Dim lngRes As Long
Const MF_BYPOSITION = &H400

lngSysMenu = GetSystemMenu(lngHWind, 0)
lngRes = RemoveMenu(lngSysMenu, 6, MF_BYPOSITION)
End Function

'when you want to hide the close button, you call the function like this:

fNoExitBtn(hWndAccessApp)

-hope this helps
-John

Thank you John. The code does prevents from closing but i need to
remove the mimize window, this is the first button fronm the three
buttons on the right upper corner. Is there any method to do it ? I
wil be very grateful if you could help me

solar

Aug 13 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.