473,511 Members | 15,477 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Open a combobox

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
Nov 21 '05 #1
8 7003
"elven byte" <el*******@elvenbyte.com> schrieb:
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
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #2
It doesn't work. DroppedDown is not a member of the combobox, vb says.

\\\
Me.ComboBox1.DroppedDown = True
///


Nov 21 '05 #3
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
Nov 21 '05 #4
"elven byte" <el*******@elvenbyte.com> schrieb:
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?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #5
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...

'DroppedDown' /is/ a member of the Windows Forms combobox control!
Are you talking about Windows Forms or Web Forms?


Nov 21 '05 #6
I've got the problem that I can not set the combostyle to simple, because
it's a program for PocketPC.
Nov 21 '05 #7
Are you using the

..Net Compact framework because on this page is written that it is supported
for that

http://msdn.microsoft.com/library/de...styletopic.asp
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows
2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003
family, .NET Compact Framework

Cor
Nov 21 '05 #8
"elven byte" <el*******@elvenbyte.com> schrieb:
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.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
7470
by: Wayne Wengert | last post by:
I am trying to populate a combobox with a lisy of items. I want the 1st item to be "Make a Selection" and the following items will be names from a table in my DB (See code below). When I run the...
3
4074
by: 1828080783Maxim | last post by:
Hi, How to open HTML combobox by means of JavaScript? -- Regards, Maxim.
2
9569
by: bds | last post by:
I'm new to .net 2.0 and I'm trying to figure out the best way to create a form that has a couple of controls and one of the controls is a combo box with a data bound list of items from another...
4
8801
by: Richard MSL | last post by:
I am making a combobox, where I add items to the combobox as they are required, as the user scrolls to the top or bottom of the list of items. It is a sorted combobox. Scrolling down works fine,...
0
2035
by: Doug | last post by:
This is a repost of an item that I still cannot resolve. I have 3 combo boxes. The first leads to the second to the third. When I have selected a value in the second box, the third box shows...
6
2845
by: dbuchanan | last post by:
VS2005 I've been reading all the help I can on the topic (MSDN, other) but I can't make sense of this. Desired behavior; The user is to choose from the displayed list of the databound combobox...
4
6644
by: Jerad Rose | last post by:
I'm baffled by this -- is there not a typed object used for ComboBox Items? Best I can tell, all of the methods for ComboBox that accept an Item are of type Object. Why in the world is a...
2
2438
by: TG | last post by:
Hi! Once again I have hit a brick wall here. I have a combobox in which the user types the server name and then clicks on button 'CONNECT' to populate the next combobox which contains all the...
1
1278
by: neelsfer | last post by:
I have a combobox called "cmb_FindXC" that is filtered based on the mainform selection of a race. fields in combobox Distance - txtfield - column1 TotalLaps - numberfield - column2 Laprace...
6
2813
by: George Allen | last post by:
I have a callback function that correctly fills a combobox (A) with two-column data on load. I have a second combobox (B) that acts as a filterchoice for the first. When the combobox B is updated,...
0
7252
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7153
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7432
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7093
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5077
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
452
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.