Click here to Skip to main content
15,899,937 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Database problem NEARLY sorted out Pin
Eddy Vluggen24-Dec-09 6:57
professionalEddy Vluggen24-Dec-09 6:57 
GeneralRe: Database problem NEARLY sorted out Pin
Md. Marufuzzaman24-Dec-09 2:03
professionalMd. Marufuzzaman24-Dec-09 2:03 
QuestionSetup Problem for Crystal Report in VS 2008 Pin
εїзεїзεїз23-Dec-09 18:57
εїзεїзεїз23-Dec-09 18:57 
AnswerRe: Setup Problem for Crystal Report in VS 2008 Pin
εїзεїзεїз23-Dec-09 20:50
εїзεїзεїз23-Dec-09 20:50 
QuestionPassing data form one form to multiple form and vise versa. [VB .Net] Pin
GeorgeShii23-Dec-09 15:16
GeorgeShii23-Dec-09 15:16 
AnswerRe: Passing data form one form to multiple form and vise versa. [VB .Net] Pin
Steven J Jowett23-Dec-09 22:49
Steven J Jowett23-Dec-09 22:49 
GeneralRe: Passing data form one form to multiple form and vise versa. [VB .Net] Pin
GeorgeShii4-Jan-10 14:38
GeorgeShii4-Jan-10 14:38 
QuestionImplicit Conversion from typea to typeb Pin
wmar6723-Dec-09 5:33
wmar6723-Dec-09 5:33 
New to Visual Basic 2008

This warning is showing up (turns to a compile error if I have Option Strict set to ON) in various lines of code and I'm unsure how to fix it.

a couple of line examples are
If GetData(driPhoneBD, chkShowAll.CheckState.ToString) = True Then

The GetData function accepts the second parameter and is Boolean - chkshowall.CheckState is -1 if it's ticked and 0 if it's not

I could set GetData second param to a numberic, but I'd rather find out how to "convert" the -1 and 0 values of CheckState to boolean because I will have to do it at other points during programming.

Another example is this
.IncDate = dgviPhoneBD.CurrentRow.Cells(6).Value.ToString

.IncDate is a date variable in my class and dgviPhoneBD is my datagridview

I read that I could use this
.IncDate = Date.Parse(dgviPhoneBD.CurrentRow.Cells(6).Value.ToString)
and whilst the warning does disappear, I'd like to know if this is the correct way to convert a value to the correct datatype.

Why, for example, is there not this
.IncDate = Date.Parse(dgviPhoneBD.CurrentRow.Cells(6).Value.ToDate)
Why is it always "ToString()"?

Thx for your help
AnswerRe: Implicit Conversion from typea to typeb Pin
Ian Shlasko23-Dec-09 6:38
Ian Shlasko23-Dec-09 6:38 
AnswerRe: Implicit Conversion from typea to typeb Pin
Gideon Engelberth23-Dec-09 17:43
Gideon Engelberth23-Dec-09 17:43 
GeneralRe: Implicit Conversion from typea to typeb Pin
wmar6723-Dec-09 22:54
wmar6723-Dec-09 22:54 
Questionwriting content into a text file Pin
Rakesh523-Dec-09 2:56
Rakesh523-Dec-09 2:56 
AnswerRe: writing content into a text file Pin
Dave Kreskowiak23-Dec-09 3:15
mveDave Kreskowiak23-Dec-09 3:15 
AnswerRe: writing content into a text file Pin
Wes Aday23-Dec-09 3:24
professionalWes Aday23-Dec-09 3:24 
AnswerRe: writing content into a text file Pin
Md. Marufuzzaman23-Dec-09 3:55
professionalMd. Marufuzzaman23-Dec-09 3:55 
QuestionDon't debug in try-catch block Pin
cstrader23223-Dec-09 2:45
cstrader23223-Dec-09 2:45 
AnswerRe: Don't debug in try-catch block Pin
Dave Kreskowiak23-Dec-09 3:13
mveDave Kreskowiak23-Dec-09 3:13 
GeneralRe: Don't debug in try-catch block Pin
cstrader23223-Dec-09 3:25
cstrader23223-Dec-09 3:25 
GeneralRe: Don't debug in try-catch block Pin
nlarson1123-Dec-09 3:43
nlarson1123-Dec-09 3:43 
GeneralRe: Don't debug in try-catch block Pin
cstrader23223-Dec-09 3:56
cstrader23223-Dec-09 3:56 
GeneralRe: Don't debug in try-catch block Pin
nlarson1123-Dec-09 5:22
nlarson1123-Dec-09 5:22 
GeneralRe: Don't debug in try-catch block Pin
cstrader23223-Dec-09 5:39
cstrader23223-Dec-09 5:39 
GeneralRe: Don't debug in try-catch block Pin
Luc Pattyn23-Dec-09 5:45
sitebuilderLuc Pattyn23-Dec-09 5:45 
GeneralRe: Don't debug in try-catch block Pin
cstrader23223-Dec-09 6:10
cstrader23223-Dec-09 6:10 
GeneralRe: Don't debug in try-catch block Pin
Luc Pattyn23-Dec-09 6:24
sitebuilderLuc Pattyn23-Dec-09 6:24 

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.