Masquer la fenêtre Access
Bonjour,
Voici comment masquer la fenêtre Access et laisser votre formulaire seul à l'écran.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| 'Déclaration API
Const SW_HIDE = 0 'Hide the window.
Const SW_MAXIMIZE = 3 'Maximize the window.
Const SW_MINIMIZE = 6 'Minimize the window.
Const SW_RESTORE = 9 'Restore the window (not maximized nor minimized).
Const SW_SHOW = 5 'Show the window.
Const SW_SHOWMAXIMIZED = 3 'Show the window maximized.
Const SW_SHOWMINIMIZED = 2 'Show the window minimized.
Const SW_SHOWMINNOACTIVE = 7 'Show the window minimized but do not activate it.
Const SW_SHOWNA = 8 'Show the window in its current state but do not activate it.
Const SW_SHOWNOACTIVATE = 4 'Show the window in its most recent size and position but do not activate it.
Const SW_SHOWNORMAL = 1 'Show the window and activate it (as usual).
Public Declare Function ShowWindow Lib "User32" (ByVal hWnd As Long, ByVal nCmdShow As Long) As Long
'minimise la fenetre access et active le formulaire
Function Fenetre_Modale(pForm As Form)
ShowWindow Application.hWndAccessApp, SW_HIDE
ShowWindow pForm.hWnd, SW_SHOWNORMAL
ShowWindow Application.hWndAccessApp, SW_SHOWMINNOACTIVE
End Function |
Exemple d'appel:
Code:
1 2 3
| Private Sub Form_Load()
Fenetre_Modale Me
end sub |
solution facile a appliquer
voile une commande que j'ai éssayer et qui marche bien biensure le formulaire doit être indépendant
Code:
1 2 3
| Private Sub Form_Load()
DoCmd.RunCommand acCmdAppMinimize
End Sub |
merci
Masquer la fenêtre Access
Bonjour, Cela fonctionne avec un formulaire, mais j'aimerais pouvoir ensuite réafficher l'état qui est lancé par l'action sur le formulaire en mode plein écran sans passer par la création d'un *snp ou un *.pdf
En clair masquer access pour l'ouverture du form et demasquer access pour affichage de l'état
Masquer la fenêtre Access
Bonjour, comme je n'ai toujours pas de réponse à mon message précédent, je me dis que je n'ai peut être pas été très clair. Aussi je reformule. Puisque l'on peut faire un <<Fenetre_Modale Me>>, ne pourrait on pas faire un <<Fenetre_UnModale Me>> qui permettrait de faire réapparaître la fenêtre compléte.