Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
Nicolas
J'ai trouvé :
Il faut : - une ComboBox Combo1 - un CommandButton Command1
Dans le Form :
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Const VK_TAB = &H9 Const CB_SHOWDROPDOWN = &H14F
Private Sub Command1_Click() DropDown Combo1 End Sub
Public Sub DropDown(ComboBox As ComboBox) SendMessage ComboBox.hwnd, CB_SHOWDROPDOWN, True, 0 End Sub
Et voilà !
@+
Nico
J'ai trouvé :
Il faut :
- une ComboBox Combo1
- un CommandButton Command1
Dans le Form :
Private Declare Function SendMessage Lib "user32"
Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As
Long, ByVal wParam As Long, lParam As Any) As Long
Const VK_TAB = &H9
Const CB_SHOWDROPDOWN = &H14F
Private Sub Command1_Click()
DropDown Combo1
End Sub
Public Sub DropDown(ComboBox As ComboBox)
SendMessage ComboBox.hwnd, CB_SHOWDROPDOWN, True, 0
End Sub
Il faut : - une ComboBox Combo1 - un CommandButton Command1
Dans le Form :
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Const VK_TAB = &H9 Const CB_SHOWDROPDOWN = &H14F
Private Sub Command1_Click() DropDown Combo1 End Sub
Public Sub DropDown(ComboBox As ComboBox) SendMessage ComboBox.hwnd, CB_SHOWDROPDOWN, True, 0 End Sub
Et voilà !
@+
Nico
Zoury
Salut Nicolas! :O)
regarde cet exemple http://groups.google.com/groups?&selm=%23RxBR3O3CHA.1896%40TK2MSFTNGP10.phx.gbl
Merci de poster les réponses au groupe afin d'en faire profiter à tous
"Nicolas" <nicolasheurtevin@wanadoo.fr> wrote in message
news:0d0001c37227$4aa27e40$a301280a@phx.gbl...
Bonjour,
Je cherche à déclencher le dropdown d'une combox au moyen
d'un bouton, comment faire ?
Merci de poster les réponses au groupe afin d'en faire profiter à tous "Nicolas" wrote in message news:0c8e01c3722c$2e1bd7d0$ J'ai trouvé :
Il faut : - une ComboBox Combo1 - un CommandButton Command1
Dans le Form :
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Const VK_TAB = &H9 Const CB_SHOWDROPDOWN = &H14F
Private Sub Command1_Click() DropDown Combo1 End Sub
Public Sub DropDown(ComboBox As ComboBox) SendMessage ComboBox.hwnd, CB_SHOWDROPDOWN, True, 0 End Sub
Et voilà !
@+
Nico
:O)
Le plus étrange c'est que l'exemple que j'ai posté t'était destiné à
l'époque.. ;O)
Merci de poster les réponses au groupe afin d'en faire profiter à tous
"Nicolas" <nicolasheurtevin@wanadoo.fr> wrote in message
news:0c8e01c3722c$2e1bd7d0$a501280a@phx.gbl...
J'ai trouvé :
Il faut :
- une ComboBox Combo1
- un CommandButton Command1
Dans le Form :
Private Declare Function SendMessage Lib "user32"
Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As
Long, ByVal wParam As Long, lParam As Any) As Long
Const VK_TAB = &H9
Const CB_SHOWDROPDOWN = &H14F
Private Sub Command1_Click()
DropDown Combo1
End Sub
Public Sub DropDown(ComboBox As ComboBox)
SendMessage ComboBox.hwnd, CB_SHOWDROPDOWN, True, 0
End Sub
Merci de poster les réponses au groupe afin d'en faire profiter à tous "Nicolas" wrote in message news:0c8e01c3722c$2e1bd7d0$ J'ai trouvé :
Il faut : - une ComboBox Combo1 - un CommandButton Command1
Dans le Form :
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Const VK_TAB = &H9 Const CB_SHOWDROPDOWN = &H14F
Private Sub Command1_Click() DropDown Combo1 End Sub
Public Sub DropDown(ComboBox As ComboBox) SendMessage ComboBox.hwnd, CB_SHOWDROPDOWN, True, 0 End Sub