OVH Cloud OVH Cloud

barre de tache

3 réponses
Avatar
IFPP.prof
Bonjour,

Avec Excel 2003, après un affichage en mode plein écran
je voudrais supprimer la barre de tache qui reste en affichant les classeurs
ouverts
(gênant lorsque l'on veut forcer utilisateur à utiliser un bouton pour
fermer ce classeur).

Existe-t-il une commande à insérer dans une macro pour la faire disparaître
momentanément?

Merci

3 réponses

Avatar
michdenis
Bonjour IFPP.prof,

Si tu fais un clic droit sur ta barre des tâches, menu contextuel : Propriétés , tu peux indiquer à windows que la barre se masque
automatiquement lorsque le curseur ne se situe pas dans le bas de ton écran. Ce n'est pas suffisant ?

Ce n'est pas suffsant ?


Salutations!


"IFPP.prof" a écrit dans le message de news: dn1suo$7re$
Bonjour,

Avec Excel 2003, après un affichage en mode plein écran
je voudrais supprimer la barre de tache qui reste en affichant les classeurs
ouverts
(gênant lorsque l'on veut forcer utilisateur à utiliser un bouton pour
fermer ce classeur).

Existe-t-il une commande à insérer dans une macro pour la faire disparaître
momentanément?

Merci
Avatar
Michel Pierron
Bonsoir IFPP.Prof;
Cela nécessite l'emploi de quelques fonctions API:

Option Explicit
Private Declare Function SystemParametersInfoA& _
Lib "user32" (ByVal uAction&, ByVal uParam& _
, lpvParam As Any, ByVal fuWinIni&)
Private Declare Function FindWindowA& Lib _
"user32" (ByVal lpClassName$, ByVal lpWindowName$)
Private Declare Function ShowWindow& Lib _
"user32" (ByVal hwnd&, ByVal nCmdShow&)
Private Declare Function GetSystemMetrics& _
Lib "user32" (ByVal nIndex&)

Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type

Private hwnd&, Desktop As RECT

Sub FullScreenExtend()
Call FullScreen
End Sub

' Warning: this may reorder desktop icons
Private Sub FullScreen(Optional Extra As Boolean = False)
Dim ScreenSize As RECT
Application.ScreenUpdating = False
' Find TaskBar handle
hwnd = FindWindowA("Shell_traywnd", "")
' Get Desktop area
SystemParametersInfoA 48, 0&, Desktop, 0&
' Set Full screen area and hide TaskBar
ScreenSize.Left = 0: ScreenSize.Top = 0
ScreenSize.Right = GetSystemMetrics(0)
ScreenSize.Bottom = GetSystemMetrics(1)
ShowWindow hwnd, 0
SystemParametersInfoA 47, 0, ScreenSize, 0
AppActivate Application.Caption
' Ultra full screen
If Extra Then
Application.CommandBars("Full Screen").Visible = False
Application.DisplayFullScreen = True
Else
Application.WindowState = xlNormal
Application.WindowState = xlMaximized
End If
End Sub

Sub TaskBar_Show()
Application.ScreenUpdating = False
' Restore desktop area
SystemParametersInfoA 47, 0, Desktop, 0
' Show TaskBar
ShowWindow hwnd, 8
If Application.DisplayFullScreen Then
Application.DisplayFullScreen = False
Else
Application.WindowState = xlNormal
Application.WindowState = xlMaximized
End If
End Sub

MP

"IFPP.prof" a écrit dans le message de news:
dn1suo$7re$
Bonjour,

Avec Excel 2003, après un affichage en mode plein écran
je voudrais supprimer la barre de tache qui reste en affichant les
classeurs

ouverts
(gênant lorsque l'on veut forcer utilisateur à utiliser un bouton pour
fermer ce classeur).

Existe-t-il une commande à insérer dans une macro pour la faire
disparaître

momentanément?

Merci




Avatar
patissou15
Merci j'essaie


"Michel Pierron" a écrit dans le message de news:
OR63Jed%
Bonsoir IFPP.Prof;
Cela nécessite l'emploi de quelques fonctions API:

Option Explicit
Private Declare Function SystemParametersInfoA& _
Lib "user32" (ByVal uAction&, ByVal uParam& _
, lpvParam As Any, ByVal fuWinIni&)
Private Declare Function FindWindowA& Lib _
"user32" (ByVal lpClassName$, ByVal lpWindowName$)
Private Declare Function ShowWindow& Lib _
"user32" (ByVal hwnd&, ByVal nCmdShow&)
Private Declare Function GetSystemMetrics& _
Lib "user32" (ByVal nIndex&)

Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type

Private hwnd&, Desktop As RECT

Sub FullScreenExtend()
Call FullScreen
End Sub

' Warning: this may reorder desktop icons
Private Sub FullScreen(Optional Extra As Boolean = False)
Dim ScreenSize As RECT
Application.ScreenUpdating = False
' Find TaskBar handle
hwnd = FindWindowA("Shell_traywnd", "")
' Get Desktop area
SystemParametersInfoA 48, 0&, Desktop, 0&
' Set Full screen area and hide TaskBar
ScreenSize.Left = 0: ScreenSize.Top = 0
ScreenSize.Right = GetSystemMetrics(0)
ScreenSize.Bottom = GetSystemMetrics(1)
ShowWindow hwnd, 0
SystemParametersInfoA 47, 0, ScreenSize, 0
AppActivate Application.Caption
' Ultra full screen
If Extra Then
Application.CommandBars("Full Screen").Visible = False
Application.DisplayFullScreen = True
Else
Application.WindowState = xlNormal
Application.WindowState = xlMaximized
End If
End Sub

Sub TaskBar_Show()
Application.ScreenUpdating = False
' Restore desktop area
SystemParametersInfoA 47, 0, Desktop, 0
' Show TaskBar
ShowWindow hwnd, 8
If Application.DisplayFullScreen Then
Application.DisplayFullScreen = False
Else
Application.WindowState = xlNormal
Application.WindowState = xlMaximized
End If
End Sub

MP

"IFPP.prof" a écrit dans le message de news:
dn1suo$7re$
Bonjour,

Avec Excel 2003, après un affichage en mode plein écran
je voudrais supprimer la barre de tache qui reste en affichant les
classeurs

ouverts
(gênant lorsque l'on veut forcer utilisateur à utiliser un bouton pour
fermer ce classeur).

Existe-t-il une commande à insérer dans une macro pour la faire
disparaître

momentanément?

Merci