Click here to Skip to main content
15,910,083 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Simple Case statement problem Pin
Dave Kreskowiak2-Jun-07 14:08
mveDave Kreskowiak2-Jun-07 14:08 
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 
idyot wrote:
Now Im sure your all wetting ya'selves laughing right now


Not at all - I remember being new to all this stuff, I'm not THAT old or cynical :P

There are many ways to turn a string into a number. By far the best is to do this:

Dim hours as int

if (int.TryParse(txtAircraftHours.Text, hours)) then


lblTotalAircraftCost.Text = AircraftRate * hours


end if

Now, here's a funny thing. I don't use VB.NET. I help here because most questions I can answer as they relate to the framwork. So, I *think* this works because VB will turn a number into a string by magic ( I think your code was doing this also ). int.TryParse *definately* takes a string and an int, and if it can convert the string to an int, it sets the int value and returns true. This means it checks for you and won't blow up ( as other methods will ), if the string is not convertible.

idyot wrote:
frustrating as hell but when ya get that one thing that goes right it keeps ya coming back for more!


Yeah, I can still remember how excited I was when I got my first little c++ projects to do something.

The book Inside C# by Tom Archer is a pretty decent overview of the C# language. If you get it, be sure to get the second edition, even that is out of date. But, it's a good, language focused book.


Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

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 
GeneralRe: FTP [modified] Pin
Sharma Nakul4-Jun-07 3:34
Sharma Nakul4-Jun-07 3:34 
GeneralRe: FTP Pin
Dave Kreskowiak4-Jun-07 13:27
mveDave Kreskowiak4-Jun-07 13:27 
QuestionNeed Help With Buttons and Panels Pin
LAPEC2-Jun-07 3:15
LAPEC2-Jun-07 3:15 
AnswerRe: Need Help With Buttons and Panels Pin
Dave Kreskowiak2-Jun-07 9:19
mveDave Kreskowiak2-Jun-07 9:19 
Questioncan i programatically enable the macro of word2003... Pin
koolprasad20032-Jun-07 2:24
professionalkoolprasad20032-Jun-07 2:24 
AnswerRe: can i programatically enable the macro of word2003... Pin
Dave Kreskowiak2-Jun-07 9:16
mveDave Kreskowiak2-Jun-07 9:16 
QuestionAutomating Database connection Pin
ips_sun2-Jun-07 0:13
ips_sun2-Jun-07 0:13 

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.