Api pour showintaskbar

cs_Stephane Messages postés 550 Date d'inscription vendredi 5 janvier 2001 Statut Membre Dernière intervention 23 septembre 2006 - 21 juin 2002 à 15:16
TKinslayer Messages postés 13 Date d'inscription dimanche 28 avril 2002 Statut Membre Dernière intervention 18 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.

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

4 réponses

lpikachu58 Messages postés 351 Date d'inscription samedi 2 février 2002 Statut Membre Dernière intervention 6 mai 2004 2
21 juin 2002 à 16:45
Tu peux pas retrouver le handle?

Viva le révolution Linux!!!!!!!!!!!!!!!
0
cs_Stephane Messages postés 550 Date d'inscription vendredi 5 janvier 2001 Statut Membre Dernière intervention 23 septembre 2006
21 juin 2002 à 16:59
salut

c koi le handle ?

a+
0
lpikachu58 Messages postés 351 Date d'inscription samedi 2 février 2002 Statut Membre Dernière intervention 6 mai 2004 2
21 juin 2002 à 17:02
ben le hwd

Viva le révolution Linux!!!!!!!!!!!!!!!
0
TKinslayer Messages postés 13 Date d'inscription dimanche 28 avril 2002 Statut Membre Dernière intervention 18 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 ?"
0
Rejoignez-nous