Hello,
I want to make my database appear floating and compact.
I use the following code to prevent the user from using the Maximize Access Application button.
This works well, but still allows the user to resize the Application (not form) border / window size. Can anyone help me with some code to stop the Application window being able to be resized?
Thank you - Merry Christmas - Mark
I want to make my database appear floating and compact.
I use the following code to prevent the user from using the Maximize Access Application button.
Code:
Option Compare Database
Private Const GWL_STYLE = (-16)
Private Const WS_MAXIMIZEBOX = &H10000
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 GetWindowLong Lib "user32" Alias "GetWindowLongA" _
(ByVal hwnd As Long, ByVal nIndex As Long) As Long
Public Function DisableMAXIMIZE() As Long
Dim hMenu As Long
Dim lStyle As Long
Dim Lhwnd As Long
Lhwnd = Access.Application.hWndAccessApp
'Disable MAXIMIZE button
lStyle = GetWindowLong(Lhwnd, GWL_STYLE)
lStyle = lStyle And Not WS_MAXIMIZEBOX
Call SetWindowLong(Lhwnd, GWL_STYLE, lStyle)
End Function
This works well, but still allows the user to resize the Application (not form) border / window size. Can anyone help me with some code to stop the Application window being able to be resized?
Thank you - Merry Christmas - Mark