|
|
Yes, makes sense.
Why don't you use an ArrayList in conjuction with your ComboBox
and make the indexes correspond to one another?
E.g.
ComboBox1.Items.Add("Drive Time")
ComboBox1.Items.Add("......")
...
Array1.Add("002302")
Array1.Add("......")
...
Public Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
value = Array1.Item(ComboBox1.SelectedIndex).ToString
End Sub
|
|
|
|
|
Thank you! that makes so much sense.
|
|
|
|
|
That is horrible. It was OK in the eighties perhaps, now things get to be handled in an object-oriented way, so turn those things into objects, show one of their properties and use another property.
BTW: that is exactly what ComboBox.DisplayMember and ValueMember properties are for.
|
|
|
|
|
Simia est simia et si aurea gestet insignia.
|
|
|
|
|
I hate to admit it but I just recently learned this. I believe what you are trying to do is display one value and use another that is associated with it for something else.
The easiest way I have seen this done is to use the DisplayMember and the ValueMember properties of the combo box like I said I just figured this out and it has made my life so much easier than the old way we handled it. So in your case you would use.
cboMyCombo.DisplayMember = "Drive Time"
cboMyCombo.ValueMember = "002302"
Msgbox(cboMyCombo.ValueMember.ToString())
I did not compile that code it may or may not work but you get the general idea.
Humble Programmer
|
|
|
|
|
Alas, this won't work, since .DisplayMember and .ValueMember
are string based which refer to a corresponding (table)column name
of the bonded data.
|
|
|
|
|
I think the best solution for this is using an enum
private enum combo_values
Drive_Time = 002302
.....
.....
end enum
this is the code for diclareing an enum. Unfortunataly ths would mean that you would have to use an underscore instead of a space. But I guess the user would not mind. So, once the enum is diclared, you can enter the following code when an item is selected:
myValue=ctype(combo1.text,enum)
if you want make 'combo_values' a variable of your type, you can do it by typing something like,' private enum combo_values as integer '.
and do inform me if it does not work.
|
|
|
|
|
Hello To All,
I want to fill the color in outer area of Arc.
Thanks
If you can think then I Can.
|
|
|
|
|
You have permission.
You're welcome
--edit
My apologies for the answer; if you have a point, a coordinate within the surface that you want to color, then you could use the floodfill[^]-algorithm.
I are Troll
|
|
|
|
|
Can u please explain me what r u trying to say.
If you can think then I Can.
|
|
|
|
|
Two things;
- The first post didn't contain a question, but a statement. If you need help, then at least write down what you need help with. Otherwise, I'll just point to rent-a-coder or something similar.
- The Floodfill algorithm (previous post contained a link with source) is used to color area's. If you know the coordinates of your arc, then you can use one of those coordinates to either color the arc itself, or the area outside the arc.
Good luck
I are Troll
|
|
|
|
|
Hi
how do i make sql statement to page the rows six per result
|
|
|
|
|
Wrong forum. Try the 'General Database' forum.
|
|
|
|
|
recently i job got a clients that demand an application to communicate with a mobile phone through the bluetooth
|
|
|
|
|
Good luck
My advice is free, and you may get what you paid for.
|
|
|
|
|
My secretary just brought me a cup of coffee and I had toast and scrambled egg for breakfast.
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
Congratulations on landing your employment!
Or did you have a different question in mind that you forgot to ask?
|
|
|
|
|
Hmm, you really don't get it: I just had a look on your older messages and you posted something similar one month ago here, got told to ask a proper question and now you do the same thing again?
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
dan4xt wrote: recently i job got a clients that demand an application to communicate with a mobile phone through the bluetooth
Good for you! Don't forget we have a huge sale on WI-FI, RFID and Bluetooth accessories.
|
|
|
|
|
|
1. We don't do other people's homework. You will learn nothing if you don't do your own homework. If you don't want to learn anything, then why are you in school?
2. Even if we had been crazy enough to do your homework for you, we can't because you haven't asked a sensible question.
3. If you got an assignment, your teacher should tell you where you can find the necessary information.
4. Posting the same question every two minutes, is only rude, and it will get you nothing. People here will respond in their own good time, not in yours.
5. If you are simply looking for an idea for your assignment, use google first.
6. Talk to your teacher about doing the assignment in VB.NET. VB6 is a dead language that is no longer used anywhere, and is hardly, if at all, supported anymore. All the necessary tools for VB.NET can be obtained free and legal from the internet.
My advice is free, and you may get what you paid for.
|
|
|
|
|
Sorry, no, you are beyond help.
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
Morse code was used by your great great great grand parents. Do you still use it at home
|
|
|
|
|
I am not anyone - so I cannot help you.
Shreekar
|
|
|
|