salut a tous
j'ai un probleme, il me faudrai savoir comment enlever un rectangle(dont je connai le hwnd) dans la barre des taches a partir d'un hwnd, en fait ce qu'il me faudrai savoir c une api correspondant à la propriété showintaskbar, mais comme l'objet n'est pas une form il n'a pas cette propriété donc je voudrai passer par les apis.
en fait je vous expique :
je créé un controle perso pour imiter un menu d'une fenetre classique, pour simuler les menus, je <<sort>> de la form un controle grace a setparent hwnd,0 mais lorsque ce controle sort, un rectangle vide apparait dans la barre des taches, donc c ce rectangle que je voudrai enlever.
Merci beaucoup pour vos réponses.
Stéphane
ps : le code suivant ne marche pas :
Private Const SW_HIDE = 0
Private Const SW_SHOW = 5
Private Const GWL_STYLE = (-16)
Private Const GWL_EXSTYLE = (-20)
Private Const WS_CAPTION = &HC00000
Private Const WS_SYSMENU = &H80000
Private Const WS_EX_APPWINDOW = &H40000
' SetWindowLong
Private Declare Function SetWindowLong _
Lib "user32" Alias "SetWindowLongA" _
(ByVal hwnd As Long, _
ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long
' GetWindowLong
Private Declare Function GetWindowLong _
Lib "user32" Alias "GetWindowLongA" _
(ByVal hwnd As Long, _
ByVal nIndex As Long) As Long
' ShowWindow
Private Declare Function ShowWindow _
Lib "user32" _
(ByVal hwnd As Long, _
ByVal nCmdShow As Long) As Long
Private Sub Command1_Click()
Dim dwStyle As Long
Dim dwNewStyle As Long
Dim hwnd As Long
hwnd = Me.hwnd
dwStyle = GetWindowLong(hwnd, GWL_EXSTYLE)
dwNewStyle = dwStyle And (Not WS_EX_APPWINDOW)
ShowWindow hwnd, SW_HIDE
SetWindowLong hwnd, GWL_EXSTYLE, dwNewStyle
ShowWindow hwnd, SW_SHOW
End Sub