- Local time
- Today, 01:24
- Joined
- Oct 29, 2018
- Messages
- 22,455
Congratulations! Glad to hear you got it sorted out. Good luck with your project.Thank you very much. Restore command worked. Now app opens on it orginal 1st form size.![]()
Congratulations! Glad to hear you got it sorted out. Good luck with your project.Thank you very much. Restore command worked. Now app opens on it orginal 1st form size.![]()
@isladogs Very nice effort. As said above, I was looking for hiding access app interface and came across.
I downloaded your app version 3.55 (SetWindows - v3.55). Tried to implement, it gives code compilation error, code incompatible with version.
I have ms access 2021 profession version 64bit.
And end users who will have accde file, will have different versions 2016 mostly but some with 32bit, and some 64bit. I always create two versions of accde 32bit and 64bit and send both to all users.
How to solve this "Setwinows" to hide app interface.
Just to help others, I want to sum up ... as above mentioned.Congratulations! Glad to hear you got it sorted out. Good luck with your project.
DoCmd.ShowToolbar "Ribbon", acToolbarNo
DoCmd.RunCommand acCmdAppRestore
Thank you very much for getting me back. I tried this new version v3.61 from your website. Your app itself is very nice, so many functionalities, really a lot of input to help others. I am grateful.The old links to my example app no longer work correctly. I've just updated the link in post #10.
Having said that I don't know why you got an error with v3.55 wherever you downloaded it from.
I have re-tested that version successfully in both Access 2010 & 365 (32-bit & 64-bit in each case).
I don't have A2021 but its almost identical to 365
However, the latest version of my app is v3.61 and can be obtained here:
![]()
Control Application Interface
This article discusses how the Access application interface can be controlled including hiding the navigation pane, ribbon or the entire application interface. Some methods can help make a database more secure. The example app opens with a form 'floating independently' on the desktop. Various...www.isladogs.co.uk
I would be grateful if you could try that version and let me know if you find any issues.
If so, please email or PM me giving me further details so I can troubleshoot if necessary. Thanks in advance
You will always have to compile any ACCDB file converted to ACCDE in the correct bitness required by users whether or not it uses APIs.
I distribute my commercial apps using a professional installer program and, like you, include both bitnesses of ACCDE within the EXE file created.
The installation script checks the Office bitness and only installs the appropriate ACCDE version
Private Sub Form_Load()
On Error GoTo Err_Handler
SetAccessWindow (SW_SHOWMINIMIZED)
DoCmd.Restore
Exit_Handler:
Exit Sub
Err_Handler:
MsgBox "Error " & Err.Number & " in Form_Load procedure : " & Err.description
Resume Exit_Handler
End Sub
Function HideAppWindow(frm As Access.Form)
'new code - app window is NOT restored when taskbar icon clicked
'omit the ...Or WS_EX_APPWINDOW ...section if you want to hide the taskbar icon
SetWindowLong frm.hWnd, GWL_EXSTYLE, GetWindowLong(frm.hWnd, GWL_EXSTYLE) Or WS_EX_APPWINDOW
ShowWindow Application.hWndAccessApp, SW_HIDE
ShowWindow frm.hWnd, SW_SHOW
End Function
call HideAppWindow
Thank you. it worked by using "Me"The 'problem' you mention was solved a long time ago with the updated code
Did you check the code in my example app?
The function is Function HideAppWindow(frm As Access.Form)
You call it in a form as: HideAppWindow Me where Me references the current form.
It isn't necessary to use Call
If you omit Me you will indeed get an error as the code won't know which form is being referenced
which installer do you use?I distribute my commercial apps using a professional installer program
Please tell me how you solve the problem if possible, i need to hide a form, not close it, but i cant do that after "HideAppWindow Me"Now my login form (1st form) wont hide, it stays on top of dashboard. I will try to tacle this later, (main idea worked) thank you.
Hi. Welcome to AWF!Please tell me how you solve the problem if possible, i need to hide a form, not close it, but i cant do that after "HideAppWindow Me"
I want to hide the form1 when the form2 popup, and show the form1 when the form2 close. I thought about to close the form instead of hide, but so many forms can popup form2, and openargs are used to pass a value already, I cant confirm reopen which form.If you are hiding the application interface using my HideAppWindow Me code, then all you have on the screen is the popup form floating on the desktop.
If you then try to hide the form using Me.Visible=False, what do you want to happen/expect to happen?
I want to hide the form or just keep the popup form stay on top, but if I use "HideAppWindow Me", the "visiable" and "modal" options are all invalid.Hi. Welcome to AWF!
To hide a form, have you tried using Me.Visible = False?
Yes, I think one form open at a time is a good idea, but the form2 could be open by form1 form3 form4 etc... I can't find which form should be reopen after form2 were closed, so I use visible option.You need to only have one form open at a time when the application window is hidden.
If you study my example app containing that code, you will see I am scrupulous about closing each form when another form is opened
Good idea! I will try it, thanks for your replyYou could set a global variable or TempVar to the value of the form being closed. Then use that to reopen that form when the next one is closed.
That should work
Otherwise, If the logic is too complicated for you to deal with in your app, I suggest you don't hide the application window
No, I already used openargs for pass other variableCould even pass calling name to called name form via OpenArgs?
So another one is hardly going to hurt?No, I already used openargs for pass other variable
I'm not good at program, just make the code together and looks like working wellSo another one is hardly going to hurt?![]()