Click here to Skip to main content
16,004,974 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: weird problem Pin
boyindie12-Jul-07 8:56
boyindie12-Jul-07 8:56 
GeneralRe: weird problem Pin
Paul Conrad12-Jul-07 9:00
professionalPaul Conrad12-Jul-07 9:00 
GeneralRe: weird problem Pin
boyindie12-Jul-07 9:01
boyindie12-Jul-07 9:01 
GeneralRe: weird problem Pin
Paul Conrad12-Jul-07 9:15
professionalPaul Conrad12-Jul-07 9:15 
QuestionHow to handle empty text boxes Pin
mymacryan12-Jul-07 7:48
mymacryan12-Jul-07 7:48 
AnswerRe: How to handle empty text boxes Pin
nlarson1112-Jul-07 7:51
nlarson1112-Jul-07 7:51 
GeneralRe: How to handle empty text boxes Pin
nlarson1112-Jul-07 8:02
nlarson1112-Jul-07 8:02 
AnswerRe: How to handle empty text boxes Pin
Christian Graus12-Jul-07 8:04
protectorChristian Graus12-Jul-07 8:04 
mymacryan wrote:
MyShelled.KC = Me.txtKC.Text


This happens because VB is weakly typed ( aka sucks ). You need to set a default value if the string is empty. One way to do this is to pretend it's strongly typed and use int.TryParse to see if you get an int out of it, and otherwise set a default. This has the advantage of not assuming your presentation layer has only allowed numbers to be entered.


Christian Graus - Microsoft MVP - C++

"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: How to handle empty text boxes Pin
nlarson1112-Jul-07 8:14
nlarson1112-Jul-07 8:14 
AnswerRe: How to handle empty text boxes Pin
The ANZAC12-Jul-07 12:58
The ANZAC12-Jul-07 12:58 
QuestionBackgroundWorker help Pin
Paul .12-Jul-07 7:32
Paul .12-Jul-07 7:32 
AnswerRe: BackgroundWorker help Pin
nlarson1112-Jul-07 7:53
nlarson1112-Jul-07 7:53 
GeneralRe: BackgroundWorker help Pin
Paul .12-Jul-07 8:02
Paul .12-Jul-07 8:02 
GeneralRe: BackgroundWorker help Pin
nlarson1112-Jul-07 8:04
nlarson1112-Jul-07 8:04 
GeneralRe: BackgroundWorker help Pin
Paul .12-Jul-07 8:13
Paul .12-Jul-07 8:13 
GeneralRe: BackgroundWorker help Pin
Dave Kreskowiak12-Jul-07 8:48
mveDave Kreskowiak12-Jul-07 8:48 
QuestionRemove an item from a combo box bound to a bindingsource Pin
steve_rm12-Jul-07 6:47
steve_rm12-Jul-07 6:47 
AnswerRe: Remove an item from a combo box bound to a bindingsource Pin
Christian Graus12-Jul-07 6:51
protectorChristian Graus12-Jul-07 6:51 
Questionusing Word.Document's SaveAs Function (VB6) Pin
reegan4112-Jul-07 6:15
reegan4112-Jul-07 6:15 
AnswerRe: using Word.Document's SaveAs Function (VB6) Pin
Thomas Chester12-Jul-07 8:56
Thomas Chester12-Jul-07 8:56 
QuestionBoxing/Unboxing Performance Pin
hrodberaht12-Jul-07 6:09
hrodberaht12-Jul-07 6:09 
AnswerRe: Boxing/Unboxing Performance Pin
Christian Graus12-Jul-07 6:12
protectorChristian Graus12-Jul-07 6:12 
AnswerRe: Boxing/Unboxing Performance Pin
Luc Pattyn12-Jul-07 6:31
sitebuilderLuc Pattyn12-Jul-07 6:31 
AnswerRe: Boxing/Unboxing Performance Pin
Dave Kreskowiak12-Jul-07 7:11
mveDave Kreskowiak12-Jul-07 7:11 
AnswerRe: Boxing/Unboxing Performance Pin
Guffa12-Jul-07 7:23
Guffa12-Jul-07 7:23 

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.