Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

Comment rajouter des icones dans les menus déroulants ?

1 réponse
Avatar
jean-paul.tauziede
Message en plusieurs parties au format MIME
--=_alternative 00467EEBC1256E3C_=
Content-Type: text/plain; charset="us-ascii"

Bonjour,

tout est dans le titre...
--=_alternative 00467EEBC1256E3C_=
Content-Type: text/html; charset="us-ascii"


<br><font size=1 face="sans-serif">Bonjour,</font>
<br>
<br><font size=1 face="sans-serif">tout est dans le titre...</font>
--=_alternative 00467EEBC1256E3C_=--

1 réponse

Avatar
ng
Salut,
Pour rajouter des icones n&b :

'This project needs a form with a menu with at least one submenu
'It also needs a picturebox, Picture1, that contains a small b/w bitmap
Const MF_BYPOSITION = &H400&
Private Declare Function GetMenu Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function GetSubMenu Lib "user32" (ByVal hMenu As Long, ByVal
nPos As Long) As Long
Private Declare Function SetMenuItemBitmaps Lib "user32" (ByVal hMenu As
Long, ByVal nPosition As Long, ByVal wFlags As Long, ByVal hBitmapUnchecked
As Long, ByVal hBitmapChecked As Long) As Long
Private Sub Form_Load()
'KPD-Team 2000
'URL:
'E-Mail:
Dim hMenu As Long, hSubMenu As Long
'get the handle of the menu
hMenu = GetMenu(Me.hwnd)
'check if there's a menu
If hMenu = 0 Then
MsgBox "This form doesn't have a menu!"
Exit Sub
End If
'get the first submenu
hSubMenu = GetSubMenu(hMenu, 0)
'check if there's a submenu
If hSubMenu = 0 Then
MsgBox "This form doesn't have a submenu!"
Exit Sub
End If
'set the menu bitmap
SetMenuItemBitmaps hSubMenu, 0, MF_BYPOSITION, Picture1.Picture,
Picture1.Picture
End Sub


Pour des icones couleur, regarde sur www.vbaccelerator.com et plus
précisément sur cette page :
http://www.vbaccelerator.com/home/VB/Code/Controls/Menus/index.asp



--
Nicolas G.
FAQ VB : http://faq.vb.free.fr
API Guide : http://www.allapi.net
Google Groups : http://groups.google.fr/
MZ-Tools : http://www.mztools.com/


a écrit dans le message de news:
c0qe7s$sf1$

Bonjour,

tout est dans le titre...