VB ComboBox.DroppedDown workaround?

G

Guest

Anyone have a workaround for this property
function that is not supported in
VB .NET CF (ComboBox.DroppedDown)?
I need to program a handheld for
one-handed data entry, and
combo-boxes that can not be dropped
down by pressing a quick-key are
useless to me in this application
(no, the alt+down arrow option does
not work for the handheld I am using,
which requires a [func] keypress
before the alt and down making it a
3 keystroke operation).
I really don't want to have to program
a custom control to perform this one
simple action. I thought about using
SendKeys... but again, not supported in
VB .NET CF. I would like to trap a special
key and use the keydown event to
drop down the combobox...
 
P

Peter Foot [MVP]

The OpenNETCF ComboBoxEx has a getter for DroppedDown (but not a setter).
This was done by sending the control a CB_GETDROPPEDSTATE message e.g.
public bool DroppedDown
{
get
{
return Win32Window.SendMessage(this.Handle, (int)CB.GETDROPPEDSTATE, 0,
0) == IntPtr.Zero ? false : true;

}
}

See the compiled SDF package (or the source) for more details -
www.opennetcf.org/sdf/

Peter
 
P

Peter Foot [MVP]

Just to answer the other part of the question - to automatically dropdown
the control you'd need to send a CB_SHOWDROPDOWN message to the control with
a value of true = IntPtr(-1) in the message wParam

Peter

--
Peter Foot
Windows Embedded MVP
http://www.inthehand.com | http://www.peterfoot.net |
http://www.opennetcf.org

Peter Foot said:
The OpenNETCF ComboBoxEx has a getter for DroppedDown (but not a setter).
This was done by sending the control a CB_GETDROPPEDSTATE message e.g.
public bool DroppedDown
{
get
{
return Win32Window.SendMessage(this.Handle, (int)CB.GETDROPPEDSTATE, 0,
0) == IntPtr.Zero ? false : true;

}
}

See the compiled SDF package (or the source) for more details -
www.opennetcf.org/sdf/

Peter

--
Peter Foot
Windows Embedded MVP
http://www.inthehand.com | http://www.peterfoot.net |
http://www.opennetcf.org

Marjorie Kangas said:
Anyone have a workaround for this property
function that is not supported in
VB .NET CF (ComboBox.DroppedDown)?
I need to program a handheld for
one-handed data entry, and
combo-boxes that can not be dropped
down by pressing a quick-key are
useless to me in this application
(no, the alt+down arrow option does
not work for the handheld I am using,
which requires a [func] keypress
before the alt and down making it a
3 keystroke operation).
I really don't want to have to program
a custom control to perform this one
simple action. I thought about using
SendKeys... but again, not supported in
VB .NET CF. I would like to trap a special
key and use the keydown event to
drop down the combobox...
 

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

Top