Open a combobox

  • Thread starter Thread starter elven byte
  • Start date Start date
E

elven byte

Hello.

I want a combo to open automatically when it gets the focus. I've been
looking for it on the Internet, but I've just found with the API.

It'd be OK, but it uses combo.hwnd, and I don't know which is the
equivalent to hwnd in VB.NET.

Can anyone help me in how to open the combobox, or how to work with the
hwnd for it?

Thanx in advance.

David
 
elven byte said:
I want a combo to open automatically when it gets the focus. I've been
looking for it on the Internet, but I've just found with the API.

\\\
Me.ComboBox1.DroppedDown = True
///
 
It doesn't work. DroppedDown is not a member of the combobox, vb says.
 
elven,

You don't need a API for that.

Private Sub ComboBox1_MouseEnter(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles ComboBox1.MouseEnter
ComboBox1.DropDownStyle = ComboBoxStyle.Simple
Me.ComboBox1.Size = New System.Drawing.Size(160, 152)
'size as you wish
End Sub
Private Sub ComboBox1_MouseLeave(ByVal sender As Object, ByVal e _
As System.EventArgs) Handles ComboBox1.MouseLeave
ComboBox1.DropDownStyle = ComboBoxStyle.DropDown
End Sub
///
There is as well a
Combobox dropeddown is true and false.
In my opinion is the problem with that one, that mouseleave is than not
fired.
Although with the method above it is as well not as good as I would
wish.

I hope this helps?

Cor
 
elven byte said:
It doesn't work. DroppedDown is not a member of the combobox, vb says.

'DroppedDown' /is/ a member of the Windows Forms combobox control! Are you
talking about Windows Forms or Web Forms?
 
Well, there's something I haven't said before. This is a combobox for a
PocketPC, perhaps that's the reason it hasn't got the DroppedDown method...
 
I've got the problem that I can not set the combostyle to simple, because
it's a program for PocketPC.
 
elven byte said:
Well, there's something I haven't said before. This is a combobox for a
PocketPC, perhaps that's the reason it hasn't got the DroppedDown
method...

You are right, this property is, according to the documentation, not
supported by the .NET Compact Framework.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top