Click here to Skip to main content
15,914,905 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionNeed help for a simple tile puzzle game Pin
marshmayllow3-Jun-07 2:58
marshmayllow3-Jun-07 2:58 
AnswerRe: Need help for a simple tile puzzle game Pin
Christian Graus3-Jun-07 18:21
protectorChristian Graus3-Jun-07 18:21 
QuestionGridview cutom control Pin
MahenBisht3-Jun-07 2:46
MahenBisht3-Jun-07 2:46 
QuestionToolstrip overflow button when DockStyle is not Top ? Pin
JW7382-Jun-07 23:33
JW7382-Jun-07 23:33 
QuestionSimple Case statement problem [modified] Pin
Visual Very Basic2-Jun-07 12:26
Visual Very Basic2-Jun-07 12:26 
AnswerRe: Simple Case statement problem Pin
Christian Graus2-Jun-07 13:17
protectorChristian Graus2-Jun-07 13:17 
GeneralRe: Simple Case statement problem Pin
Visual Very Basic2-Jun-07 13:48
Visual Very Basic2-Jun-07 13:48 
GeneralRe: Simple Case statement problem Pin
Dave Kreskowiak2-Jun-07 14:08
mveDave Kreskowiak2-Jun-07 14:08 
idyot wrote:
So are u saying that I dont need to declare this as a variable and instead just use cmbPlanes.Text?


In your case, yes.
Select Case cmbPlanes.Text



idyot wrote:
How do I link the variable named Aircraft to the chosen index in the combobox


OK. To recant what I just said...If Airplane is a string varible, then all you do is something like this in your posted code:
Airplane = cmbPlanes.Text
Select Case Airplane
    Case ....

This is really VB.NET 101 type stuff. I suggest picking up a book on VB.NET for beginners.


How you're doing this now isn't really the correct way of doing it in the first place. Normally, you'd have this data (and more) in a DataTable, or some other collection, and bind your controls to this data. Picking an item in the ComboBox would automatically select the rest of the records data.

I'm not really going to go into how this works because it's a more advanced technique. Something that will boggle your mind if you don't understand how Select/Case works yet.

Seriously, pick up a book or two.



A guide to posting questions on CodeProject[^]

Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007


GeneralRe: Simple Case statement problem Pin
Visual Very Basic2-Jun-07 14:14
Visual Very Basic2-Jun-07 14:14 
GeneralRe: Simple Case statement problem Pin
Visual Very Basic2-Jun-07 14:31
Visual Very Basic2-Jun-07 14:31 
GeneralRe: Simple Case statement problem Pin
Dave Kreskowiak2-Jun-07 17:19
mveDave Kreskowiak2-Jun-07 17:19 
GeneralRe: Simple Case statement problem Pin
Visual Very Basic2-Jun-07 17:50
Visual Very Basic2-Jun-07 17:50 
GeneralRe: Simple Case statement problem Pin
Christian Graus2-Jun-07 18:56
protectorChristian Graus2-Jun-07 18:56 
GeneralRe: Simple Case statement problem Pin
Visual Very Basic2-Jun-07 19:15
Visual Very Basic2-Jun-07 19:15 
GeneralRe: Simple Case statement problem Pin
Christian Graus2-Jun-07 19:32
protectorChristian Graus2-Jun-07 19:32 
GeneralRe: Simple Case statement problem Pin
Visual Very Basic2-Jun-07 22:03
Visual Very Basic2-Jun-07 22:03 
GeneralRe: Simple Case statement problem Pin
Christian Graus3-Jun-07 1:30
protectorChristian Graus3-Jun-07 1:30 
GeneralRe: Thanks for your advice and assistance Pin
Visual Very Basic3-Jun-07 21:24
Visual Very Basic3-Jun-07 21:24 
GeneralRe: Simple Case statement problem Pin
Dave Kreskowiak3-Jun-07 4:33
mveDave Kreskowiak3-Jun-07 4:33 
GeneralRe: Simple Case statement problem Pin
Paul Conrad3-Jun-07 5:13
professionalPaul Conrad3-Jun-07 5:13 
AnswerRe: Simple Case statement problem Pin
Dave Sexton3-Jun-07 3:27
Dave Sexton3-Jun-07 3:27 
QuestionFTP Pin
Sharma Nakul2-Jun-07 5:09
Sharma Nakul2-Jun-07 5:09 
AnswerRe: FTP Pin
Dave Kreskowiak3-Jun-07 4:17
mveDave Kreskowiak3-Jun-07 4:17 
GeneralRe: FTP Pin
Sharma Nakul3-Jun-07 22:43
Sharma Nakul3-Jun-07 22:43 
GeneralRe: FTP Pin
Dave Kreskowiak4-Jun-07 2:08
mveDave Kreskowiak4-Jun-07 2:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.