The code below toggles between kiosk mode and "not kiosk mode"
What is required to take the "toggle bit" out ??? i.e. force KIOSK mode until application is exited
I have managed to invoke the code at application startup, so it's working OK (user can't move or size the window) but ...
... if the user unlocks the TaskBar (at bottom of screen), the app window suddenly becomes Moveable/Sizeable, which is uwanted behaviour
Thanks for any gems of wisdom !
Public Function ToggleKioskModeAlike()
Dim NewStyle As Long
Access.RunCommand Access.AcCommand.acCmdAppMaximize
NewStyle = GetWindowLong(Application.hWndAccessApp, GWL_STYLE) Xor (WS_BORDER + WS_CAPTION)
SetWindowLong Application.hWndAccessApp, GWL_STYLE, NewStyle
SetWindowPos Application.hWndAccessApp, 0&, 0, 0, 0, 0, SWP_NOZORDER Or SWP_NOMOVE Or SWP_NOSIZE Or SWP_NOACTIVATE Or SWP_DRAWFRAME
Application.CommandBars("menu bar").Enabled = Not Application.CommandBars("menu bar").Enabled
End Function