473,811 Members | 3,356 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Disable Maximize/Minimize/Restore in Access 2007

Is there a way to disable the maximize, minimize and restore buttons
of the Access window in A2K7? I can't seem to find one. I am setting
up an application that will be launched via Terminal Services but
don't have seamless windows so I need to make sure the users can't get
to the desktop.

Thanks!
Jun 27 '08 #1
8 8860
On Tue, 20 May 2008 10:37:33 -0700 (PDT), evenlater
<ev*******@gmai l.comwrote:

Have you tried to set some form-level properties such as AutoResize
and MinMaxButtons?

-Tom.

>Is there a way to disable the maximize, minimize and restore buttons
of the Access window in A2K7? I can't seem to find one. I am setting
up an application that will be launched via Terminal Services but
don't have seamless windows so I need to make sure the users can't get
to the desktop.

Thanks!
Jun 27 '08 #2
On May 21, 8:57 pm, Tom van Stiphout <no.spam.tom7.. .@cox.netwrote:
Have you tried to set some form-level properties such as AutoResize
and MinMaxButtons?
Yes, but that only applies to the form, not the Access window. I am
trying to prevent my users from getting to the desktop at all.
Jun 27 '08 #3
On Thu, 22 May 2008 19:13:56 -0700 (PDT), evenlater
<ev*******@gmai l.comwrote:

That requires a fairly advanced level of programming, including
subclassing of that window. You'll need a thorough understanding of
the Windows API.

-Tom.
>On May 21, 8:57 pm, Tom van Stiphout <no.spam.tom7.. .@cox.netwrote:
>Have you tried to set some form-level properties such as AutoResize
and MinMaxButtons?

Yes, but that only applies to the form, not the Access window. I am
trying to prevent my users from getting to the desktop at all.
Jun 27 '08 #4

Actually, the code for doing this was posted in the newsgroup a few
years back, and it doesn't take all that much in the way of API calls.

The real problem however, could be resolved by anyone competent in
setting up Terminal Server and applications that run on them. The OP
should *really* look at hiring one of those to set this application
up.

(There are ways around the API calls that make it next to useless for
what the OP has stated as a requirement.)
On Thu, 22 May 2008 20:51:54 -0700, Tom van Stiphout
<no************ *@cox.netwrote:
>On Thu, 22 May 2008 19:13:56 -0700 (PDT), evenlater
<ev*******@gma il.comwrote:

That requires a fairly advanced level of programming, including
subclassing of that window. You'll need a thorough understanding of
the Windows API.

-Tom.
>>On May 21, 8:57 pm, Tom van Stiphout <no.spam.tom7.. .@cox.netwrote:
>>Have you tried to set some form-level properties such as AutoResize
and MinMaxButtons?

Yes, but that only applies to the form, not the Access window. I am
trying to prevent my users from getting to the desktop at all.
--
Please Post Any Replies To This Message Back To the Newsgroup.
There are "Lurkers" around who can benefit by our exchange!
Jun 27 '08 #5
Hi Chuck,

I did a quick skooch through the older posts but could not seem to
locate the specific discussion you mention. Do you per chance happen
to have a link you could post?

Cheers

The Frog
Jun 27 '08 #6

"The Frog" <Mr************ @googlemail.com schreef in bericht news:20******** *************** ***********@26g 2000hsk.googleg roups.com...
Hi Chuck,

I did a quick skooch through the older posts but could not seem to
locate the specific discussion you mention. Do you per chance happen
to have a link you could post?

Cheers

The Frog
Paste the following code into a module, then call it with
Call Buttons(false)
To turn them off and
Call Buttons(True)
to turn them on

********** Code Start *************
Option Explicit

Private Const GWL_STYLE = (-16)
Private Const WS_CAPTION = &HC00000
Private Const WS_MINIMIZEBOX = &H20000
Private Const WS_MAXIMIZEBOX = &H10000
Private Const WS_SYSMENU = &H80000
Private Const SWP_NOSIZE = &H1
Private Const SWP_NOMOVE = &H2
Private Const SWP_NOZORDER = &H4
Public Const SWP_FRAMECHANGE D = &H20

Private Declare Function GetWindowLong _
Lib "user32" Alias "GetWindowLongA " ( _
ByVal hwnd As Long, _
ByVal nIndex As Long _
) As Long

Private Declare Function SetWindowLong _
Lib "user32" Alias "SetWindowLongA " ( _
ByVal hwnd As Long, _
ByVal nIndex As Long, _
ByVal dwNewLong As Long _
) As Long

Private Declare Function SetWindowPos _
Lib "user32" ( _
ByVal hwnd As Long, _
ByVal hWndInsertAfter As Long, _
ByVal X As Long, _
ByVal Y As Long, _
ByVal cx As Long, _
ByVal cy As Long, _
ByVal wFlags As Long _
) As Long
' *************** *************** *************** *****
'

Function AccessTitleBar( Show As Boolean) As Long
Dim hwnd As Long
Dim nIndex As Long
Dim dwNewLong As Long
Dim dwLong As Long
Dim wFlags As Long

hwnd = hWndAccessApp
nIndex = GWL_STYLE
wFlags = SWP_NOSIZE + SWP_NOZORDER + SWP_FRAMECHANGE D + SWP_NOMOVE

dwLong = GetWindowLong(h wnd, nIndex)

If Show Then
dwNewLong = (dwLong Or WS_CAPTION)
Else
dwNewLong = (dwLong And Not WS_CAPTION)
End If

Call SetWindowLong(h wnd, nIndex, dwNewLong)
Call SetWindowPos(hw nd, 0&, 0&, 0&, 0&, 0&, wFlags)
End Function
Function Buttons(Show As Boolean) As Long
Dim hwnd As Long
Dim nIndex As Long
Dim dwNewLong As Long
Dim dwLong As Long

hwnd = hWndAccessApp
nIndex = GWL_STYLE

Const wFlags = SWP_NOSIZE + SWP_NOZORDER + SWP_FRAMECHANGE D + SWP_NOMOVE
Const FLAGS_COMBI = WS_MINIMIZEBOX Or WS_MAXIMIZEBOX Or WS_SYSMENU

dwLong = GetWindowLong(h wnd, nIndex)

If Show Then
dwNewLong = (dwLong Or FLAGS_COMBI)
Else
dwNewLong = (dwLong And Not FLAGS_COMBI)
End If

Call SetWindowLong(h wnd, nIndex, dwNewLong)
Call SetWindowPos(hw nd, 0&, 0&, 0&, 0&, 0&, wFlags)
End Function
' ********** Code End *************

BTW: I think this code originates fromTerry Kreft

Arno R
Jun 27 '08 #7

When I said "a few years back", I was serious. You'll have to go back
quite a few years to find the posts (1997-99 time frame). Search for
"NoControlB ox" at Google, and you'll probably find the thread.

I think that thread just discusses how to disable the controls,
however there was also another thread that discussed totally removing
the controls from the title bar, but I also remember we dropped the
thread fairly quickly when we "were made aware of" what we were
posting. (That thread may have been over in one of the VB discussion
groups however....)

Yeah, it's cool and rather fun to do, but it just makes users jump
through hoops to overcome a "neat" little hack of yours. And the
_last_ thing you want a user to do (especially in a database!) is to
find their own "neat" tricks.
On Wed, 28 May 2008 00:38:56 -0700 (PDT), The Frog
<Mr************ @googlemail.com wrote:
>I did a quick skooch through the older posts but could not seem to
locate the specific discussion you mention. Do you per chance happen
to have a link you could post?
--
Please Post Any Replies To This Message Back To the Newsgroup.
There are "Lurkers" around who can benefit by our exchange!
Jun 27 '08 #8
Thanks Arno and Chuck,

I will give this a crack with an MDE. Hopefully the code will work
happily in the MDE and not leave any permanent scars on the users
brains :-) It might just prove to be a bit of fun to tease some of the
IT guys 'upstairs' with (Tee hee hee).

Thanks Fellas

Cheers

The Frog
Jun 27 '08 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3554
by: Manoj | last post by:
Hi All, We have an VB.net application which has 31 projects in one solution.In this we want to disable the Maximize and minimize buttons of the child forms as they load in the main MDI.We have been unable to do this.The methods tried include : 1. Passing the MinimixeBox = False bit of code in the child form load method 2. Removing the control from design view.In the properties window 3. Passing MinimixeBox = False bit of code it in the...
3
2991
by: bobdydd | last post by:
Hi Everybody On Report Preview Does anyone know of a way to disable the Minimum, Maximum and Close buttons, so that the user cannot close by any other means that the Toolbar button that I have supplied. This is easy enough on Access 2000 FORMS in Properties>>Format etc, but this is not available on a REPORT.
1
3832
by: Tim Bücker | last post by:
Hello. I have a form with some controls on it. One of these controls is a button that disables/ enables all the other controls. The form itself should also be "disabled/enabled", so I set this.FormBorderStyle = FormBorderStyle.Sizable; to "enable" and this.FormBorderStyle = FormBorderStyle.Fixed3D; to "disable" the form (no resize).
4
1913
by: Mark | last post by:
We have a windows 2000 server with terminal services activated. Users will connect using RDP and launch an application. Sometimes, users will minimize the application when they meant to minimize the terminal server session so they can get back to their desktop. The permissions set on the terminal server are such that they cannot maximize the application again. Since the application remembers it's location or state, the next user that...
3
5803
by: philelpko | last post by:
Morning all, 2 questions...... I have disabled the control boxes, minimize/maximize, resize etc on my forms so users cannot do anything other than what the forms allow. The problem is that despite the controls being disabled in access, each form appear as a separate tab on the taskbar which can be minimized / maximized / closed (on right click). Naturally this is a problem as it reduces my ability to make the database idiot proof.so.... ...
4
13461
by: EmilH | last post by:
Hi, Can anybody show me how to minimize/maximize a window dynamically? I placed buttons for each of these commands and want to place the code which will minimize and maximize the window. Thanks in advance. Emil.
5
2310
by: David Jackson | last post by:
Hello, I have a WinForms app (VS.NET 2005 + SP1) where the FormBorderStyle of the main form is set to FixedDialog. I've added a NotifyIcon, so have set the form's MinimizeBox property to true; This enables the form's minimize button, obviously, and the NotifyIcon stuff is working.
5
2631
by: fluff | last post by:
Hello, I have a html page with javascript in it. How do I disable the minimize (the box with the underscore in it in the corner)? I know there are already several people who asked the same question and the answers are useful like from this: http://www.thescripts.com/forum/thread92828.html but the solutions don't work exactly the way I want. putting onblur="this.focus()" in the body does keep the page from being minimized, but then...
3
12439
convexcube
by: convexcube | last post by:
Hi everyone, Now that I've found a way to disable the ribbon etc. I need to disable the application maximize button. I have looked at this post and implemented it, but it disables the close and minimize buttons as well. Is there a simple command I can use to disable just this button or any way I can adapt the cited post to do just that? Kind regards, Ken.
0
10644
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10379
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10127
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9201
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7665
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6882
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3863
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.