Changer l'aspect du boutton démarrer
Source / Exemple :
Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Declare Function GetDesktopWindow Lib "user32" () As Long
Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long
Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
Private Declare Function WindowFromPoint Lib "user32" (ByVal xPoint As Long, ByVal yPoint As Long) As Long
Const GW_NEXT = 2
Const GW_CHILD = 5
Const BM_SETIMAGE = &HF7
Const Delay = 15
Const BM_SETIMAGE = &HF7
Dim Stbutt As Long
'Exécuter le code
GetStButt
PostMessage Stbutt, BM_SETIMAGE,0,Picturebox1.Picture.Handle
'Autre fonctions
Sub GetStbutt()
Dim dt, hwnda As Long
Dim clstr As String * 14
dt = GetDesktopWindow()
hwnda = GetWindow(dt, GW_CHILD)
Do While hwnda <> 0
GetClassName hwnda, clstr, 14
If Left(clstr, 13) = "Shell_TrayWnd" Then
hwnda = GetWindow(hwnda, GW_CHILD)
Do While hwnda <> 0
GetClassName hwnda, clstr, 7
If Left(clstr, 6) = "Button" Then
Stbutt = hwnda
Exit Sub
End If
hwnda = GetWindow(hwnda, GW_NEXT)
Loop
End If
hwnda = GetWindow(hwnda, GW_NEXT)
Loop
End Sub
Conclusion :
Voir le screenshot
Défault, si vous arrêter le prog vous n'aurez plus d'image sur le boutton mais le menu marche quand même
Vous n'êtes pas encore membre ?
inscrivez-vous, c'est gratuit et ça prend moins d'une minute !
Les membres obtiennent plus de réponses que les utilisateurs anonymes.
Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.
Le fait d'être membre vous permet d'avoir des options supplémentaires.