Re: Drop down a combobox programatically ?
- From: "Claes Bergefall" <louplou@xxxxxxxxxxxxx>
- Date: Mon, 18 Sep 2006 16:29:52 -0400
You don't need P/Invoke for this. Just set the DroppedDown property to true
/claes
"Nand Kishore Gupta" <NandKishoreGupta@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:9CCF9705-22E4-492D-98BF-E0994EEE1E11@xxxxxxxxxxxxxxxx
You can drop the list portion of a combo box programatically using Windows
SendMessage API. To do so in C#:
// Declare the following in your class
[DllImport("user32.dll")]
public static extern int SendMessage(int hWnd, int msg, int wParam, IntPtr
lParam);
public const int CB_SHOWDROPDOWN = 0x14F;
// In the leave event of combobox, use the following code:
SendMessage(comboBox1.Handle.ToInt32(), CB_SHOWDROPDOWN, 1, IntPtr.Zero);
--
Nand Kishore Gupta
"hung tran" wrote:
Hi,
I'd like to drop down a combobox after validating the Leave() event, how
can I do that ?
Thanks
.
- Follow-Ups:
- Re: Drop down a combobox programatically ?
- From: omegans
- Re: Drop down a combobox programatically ?
- References:
- Drop down a combobox programatically ?
- From: hung tran
- Drop down a combobox programatically ?
- Prev by Date: Re: sscanf in c#
- Next by Date: Re: sscanf in c#
- Previous by thread: Re: Drop down a combobox programatically ?
- Next by thread: Re: Drop down a combobox programatically ?
- Index(es):
Relevant Pages
|