Click here to Skip to main content
15,894,955 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralMaking the coloum header of datagridview read only Pin
Pradip Kishore25-Jan-08 0:20
Pradip Kishore25-Jan-08 0:20 
GeneralRe: Making the coloum header of datagridview read only Pin
Francis K Antony25-Jan-08 1:03
Francis K Antony25-Jan-08 1:03 
GeneralRe: Making the coloum header of datagridview read only Pin
Pradip Kishore25-Jan-08 2:25
Pradip Kishore25-Jan-08 2:25 
GeneralTo Drag And Drop B/W Two List Box [modified] Pin
sumit703424-Jan-08 22:15
sumit703424-Jan-08 22:15 
GeneralRe: To Drag And Drop B/W Two List Box Pin
Justin Perez25-Jan-08 3:06
Justin Perez25-Jan-08 3:06 
Questionvb6 code to vb.net code Pin
Member 412150324-Jan-08 21:14
Member 412150324-Jan-08 21:14 
GeneralRe: vb6 code to vb.net code Pin
Johan Hakkesteegt25-Jan-08 2:16
Johan Hakkesteegt25-Jan-08 2:16 
AnswerRe: vb6 code to vb.net code Pin
Guffa25-Jan-08 6:02
Guffa25-Jan-08 6:02 
The translation of the VB6 code is as bad as the VB6 code is, and the VB6 code isn't very good to start with.

Suffixes like $ aren't used for variables any more. That is an old artifact from the time when variables in BASIC were not declared with a type.

Instead of putting together a string that can be identified by the Val function, you should use the Int32.Parse method and specify how you want to parse the string:

Int32.Parse(c2.Substring(pos, 2), NumberStyles.AllowHexSpecifier)

Then convert the number to a char:

Convert.ToChar(Int32.Parse(c2.Substring(pos, 2), NumberStyles.AllowHexSpecifier))

So:

For pos As Integer = 0 To 11 Step 2
cmd += Convert.ToChar(Int32.Parse(c2.Substring(pos, 2), NumberStyles.AllowHexSpecifier))
Next

Experience is the sum of all the mistakes you have done.

QuestionDesign Card Pin
structures8324-Jan-08 20:31
structures8324-Jan-08 20:31 
GeneralRe: Design Card Pin
Johan Hakkesteegt25-Jan-08 1:56
Johan Hakkesteegt25-Jan-08 1:56 
GeneralRe: Design Card Pin
Dave Kreskowiak25-Jan-08 3:46
mveDave Kreskowiak25-Jan-08 3:46 
Questionbarcode reader Pin
structures8324-Jan-08 20:27
structures8324-Jan-08 20:27 
GeneralRe: barcode reader Pin
CKnig24-Jan-08 21:39
CKnig24-Jan-08 21:39 
GeneralRe: barcode reader Pin
Tom John24-Jan-08 22:01
Tom John24-Jan-08 22:01 
GeneralRe: barcode reader Pin
Justin Perez25-Jan-08 3:14
Justin Perez25-Jan-08 3:14 
GeneralRe: barcode reader Pin
Paul Conrad25-Jan-08 3:56
professionalPaul Conrad25-Jan-08 3:56 
GeneralRe: barcode reader Pin
Dave Kreskowiak25-Jan-08 3:44
mveDave Kreskowiak25-Jan-08 3:44 
GeneralRe: barcode reader Pin
Paul Conrad25-Jan-08 3:55
professionalPaul Conrad25-Jan-08 3:55 
Questionproblem with basic timer in vb.net [modified] Pin
Chun224-Jan-08 19:48
Chun224-Jan-08 19:48 
GeneralRe: problem with basic timer in vb.net Pin
CKnig24-Jan-08 21:44
CKnig24-Jan-08 21:44 
GeneralRe: problem with basic timer in vb.net Pin
Chun225-Jan-08 5:36
Chun225-Jan-08 5:36 
GeneralRe: problem with basic timer in vb.net Pin
Dave Kreskowiak25-Jan-08 9:41
mveDave Kreskowiak25-Jan-08 9:41 
Questionhow can calling command prompt ? [modified] Pin
break_day24-Jan-08 18:58
break_day24-Jan-08 18:58 
AnswerRe: how can calling command prompt ? Pin
Dave Kreskowiak25-Jan-08 3:41
mveDave Kreskowiak25-Jan-08 3:41 
QuestionFind text problem Pin
monsieur_jj24-Jan-08 16:14
monsieur_jj24-Jan-08 16:14 

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.