 |
 |
 |
| |
Amusez-vous et gagnez de l'argent
|
|
 |
 |
 |
 |
 |
 |
| |
NEWSLETTER
Soyez tenu au courant des nouveautés ou bons plans. Les sujets concernés sont :
- la photo
- la programmation
|
|
 |
 |
 |
|
 |
 |
 |
| |
 Visible (invisible) dans la Barre Des Taches
Paramètres en entrée : NomFeuille (Form), Visible (booléen)
Paramètres en sortie : Aucun
Dans un Module :
Public Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Public Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Public Const SW_HIDE = 0
Public Const SW_SHOW = 5
Public Const GWL_EXSTYLE = (-20)
Public Const WS_EX_TOOLWINDOW = &H80&
Public Sub BarreDesTachesVisible(NomFeuille As Form, Visible As Boolean)
Dim L As Long
L = ShowWindow(NomFeuille.hwnd, SW_HIDE)
DoEvents
L = SetWindowLong(NomFeuille.hwnd, GWL_EXSTYLE, IIf(Visible, -WS_EX_TOOLWINDOW, WS_EX_TOOLWINDOW))
DoEvents
L = ShowWindow(NomFeuille.hwnd, SW_SHOW)
End Sub
Dans la feuille que vous désirez rendre visible (ou invisible) dans la barre des tâches, mettre le code suivant :
‘Visible
BarreDesTachesVisible Me, True
OU
‘Invisible
BarreDesTachesVisible Me, False
|
|
 |
 |
 |
|