cs_Stephane
Messages postés550Date d'inscriptionvendredi 5 janvier 2001StatutMembreDernière intervention23 septembre 2006
-
21 juin 2002 à 15:16
TKinslayer
Messages postés13Date d'inscriptiondimanche 28 avril 2002StatutMembreDernière intervention18 juillet 2002
-
21 juin 2002 à 18:25
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.
' 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
TKinslayer
Messages postés13Date d'inscriptiondimanche 28 avril 2002StatutMembreDernière intervention18 juillet 2002 21 juin 2002 à 18:25
Ok, le handle, tu l'utilise déjà en fait. Car tu prend la propriété hwnd, qui est le handle windows d'un objet. L traduction de handle ne serait pas très parlante, quoique... En français ca voudrait dire poignée. Le handle est le numéro (long) d'un objet de windows, et permet à windows de reconnaitre et d'effectuer des opérations sur un objet précis.
"You must choose, Rand," Moiraine said. "The world will be broken whether you break it or not. Tarmon Gai'don will come, and that alone will tear the world apart. Will tou still try to hide from what you are, and leave the world to face the Last Battle undefended ?"