Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 136,412 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 2,465 people online right now. Registration is fast and FREE... Join Now!




Need Help with Combo Box

 
Reply to this topicStart new topic

Need Help with Combo Box

Demon4231
14 Oct, 2008 - 03:36 PM
Post #1

New D.I.C Head
*

Joined: 23 Dec, 2007
Posts: 8

I am trying to have a bunch of items listed alphabetically in a combo box but I want the word "All" at the top. So if I have an item named "AA" or something then "All" isn't at the top. How can I keep making "All" be at the top of the Combo Box?
User is offlineProfile CardPM
+Quote Post

thava
RE: Need Help With Combo Box
14 Oct, 2008 - 06:40 PM
Post #2

D.I.C Regular
Group Icon

Joined: 17 Apr, 2007
Posts: 442



Thanked: 18 times
Dream Kudos: 50
My Contributions
what language did you use .net or vb6 put some code here we should happy to help you one thing we need show what is your effort(i.e) post your problem with code
User is offlineProfile CardPM
+Quote Post

Demon4231
RE: Need Help With Combo Box
15 Oct, 2008 - 03:08 AM
Post #3

New D.I.C Head
*

Joined: 23 Dec, 2007
Posts: 8

I'm working with VB6. I just put in a combo box and have it listed alphabetically and want the words "All" to always be at the top of the list. I have also have a bunch of items being added to the list.

CODE

appname.Items.Clear()
appname.Sorted = True
appname.Items.Add("All")
appname.Items.Add(My.Settings.App1)
appname.Items.Add(My.Settings.App2)
.....

User is offlineProfile CardPM
+Quote Post

thava
RE: Need Help With Combo Box
15 Oct, 2008 - 05:04 AM
Post #4

D.I.C Regular
Group Icon

Joined: 17 Apr, 2007
Posts: 442



Thanked: 18 times
Dream Kudos: 50
My Contributions
hey this code belongs to vb.net not in vb6
ok
even though it is a logical problem
i give some suggestion to solve your problem

first add the item all then
pick the remaining item in an array and sort it
now add the items to the listbox in a sequence manner

This post has been edited by thava: 15 Oct, 2008 - 05:06 AM
User is offlineProfile CardPM
+Quote Post

Demon4231
RE: Need Help With Combo Box
15 Oct, 2008 - 07:30 AM
Post #5

New D.I.C Head
*

Joined: 23 Dec, 2007
Posts: 8

Sorry, haven't used VB in a while. I know how to make an array but I just can't seem to think of a way to make it sort everything but the word "All". Can you give me an example?

This post has been edited by Demon4231: 15 Oct, 2008 - 07:30 AM
User is offlineProfile CardPM
+Quote Post

edenmills
RE: Need Help With Combo Box
15 Oct, 2008 - 10:52 AM
Post #6

New D.I.C Head
*

Joined: 15 Oct, 2008
Posts: 1

Many of you people know about MSN CHAT. It’s a pure form of C++ and visual basic. Is this possible to add a webcam and voice chat feature in MSNCHAT? It’s closed now but many people use their chat applet in their own chat servers.

Social Bookmarking Service
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 12:31PM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month