|
-
Oct 6th, 2003, 06:08 AM
#1
Thread Starter
Addicted Member
Prevent combobox control from droping down?
Hi
does anyone here have any idea on how to prevent the combobox to dropdown when the user click on the combobox button?
i tried to use the following code but it does not seems to do what i want:
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Sub MultiComboBox_DropDown(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.DropDown
Const CB_SHOWDROPDOWN = &H14F
SendMessage(combobox.Handle.ToInt32, CB_SHOWDROPDOWN, True, 0)
End Sub
Thanks
Last edited by CoMMiE; Oct 6th, 2003 at 06:11 AM.
To follow the path:
look to the master,
follow the master,
walk with the master,
see through the master,
become the master.-ZEN
-
Oct 6th, 2003, 06:54 AM
#2
Sleep mode
First , all longs to integers . Second , False lParam . Takes nothing . Try this :
VB Code:
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Integer, ByVal wMsg As
Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer
Const CB_SHOWDROPDOWN = &H14F
Private Sub ComboBox1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox1.Click
SendMessage(ComboBox1.Handle.ToInt32, CB_SHOWDROPDOWN, False, 0)
End Sub
-
Oct 6th, 2003, 09:58 AM
#3
Why not just use a textbox?
-
Oct 6th, 2003, 12:04 PM
#4
why not set it's style to ComboBoxStyle.Simple ?
~
if a post is resolved, please mark it as [Resolved]
protected string get_Signature(){return Censored;}
[vbcode][php] please use code tags when posting any code [/php][/vbcode]
-
Oct 6th, 2003, 08:46 PM
#5
Thread Starter
Addicted Member
i am trying to replace the dropdown of the combobox with my own listview, so that i can have a multicolumn combobox
To follow the path:
look to the master,
follow the master,
walk with the master,
see through the master,
become the master.-ZEN
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|