Click here to Skip to main content
16,005,467 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionlogin form concept Pin
deepakkp11-Oct-06 19:42
deepakkp11-Oct-06 19:42 
AnswerRe: login form concept Pin
Dave Sexton11-Oct-06 21:18
Dave Sexton11-Oct-06 21:18 
QuestionQuestion about CSV file [modified] Pin
TeiUKei11-Oct-06 18:22
TeiUKei11-Oct-06 18:22 
AnswerRe: Question about CSV file Pin
Dave Sexton11-Oct-06 21:01
Dave Sexton11-Oct-06 21:01 
GeneralRe: Question about CSV file Pin
TeiUKei11-Oct-06 21:51
TeiUKei11-Oct-06 21:51 
GeneralRe: Question about CSV file Pin
Dave Kreskowiak12-Oct-06 3:07
mveDave Kreskowiak12-Oct-06 3:07 
GeneralRe: Question about CSV file Pin
TeiUKei12-Oct-06 14:17
TeiUKei12-Oct-06 14:17 
GeneralRe: Question about CSV file Pin
Dave Kreskowiak12-Oct-06 16:04
mveDave Kreskowiak12-Oct-06 16:04 
First, copy and paste your ACTUAL code, not something that's "alomst the same". I very small difference in your code can make all the difference in your output.

Next, don't use ControlChars.NewLine. If you want a complete new line, which is TWO characters in Windows (CR and LF), use Environment.NewLine instead.


TeiUKei wrote:
If c.Length <= 1 Then
c = c.PadRight(2, CChar(" "))
ElseIf c.Length <= 2 Then
c = c.PadRight(3, CChar(" "))
ElseIf c.Length > 2 And c.Length <= 4 Then
c = c.PadRight(5, CChar(" "))
ElseIf c.Length > 4 And c.Length <= 6 Then
c = c.PadRight(7, CChar(" "))
ElseIf c.Length > 6 And c.Length <= 11 Then
c = c.PadRight(12, CChar(" "))
End If


What on earth is this doing?? You realize that c is being evaluated for length in every one of those if statements, including after each new change you make by padding it with spaces?


Dave Kreskowiak
Microsoft MVP - Visual Basic


GeneralRe: Question about CSV file Pin
TeiUKei12-Oct-06 16:35
TeiUKei12-Oct-06 16:35 
GeneralRe: Question about CSV file Pin
Dave Kreskowiak13-Oct-06 1:54
mveDave Kreskowiak13-Oct-06 1:54 
GeneralRe: Question about CSV file Pin
TeiUKei14-Oct-06 14:47
TeiUKei14-Oct-06 14:47 
GeneralRe: Question about CSV file Pin
Dave Kreskowiak15-Oct-06 3:39
mveDave Kreskowiak15-Oct-06 3:39 
Questioncystal reports deployment using typed datasets Pin
steve_rm11-Oct-06 18:04
steve_rm11-Oct-06 18:04 
AnswerRe: error on store procedure link to vb Pin
Dave Kreskowiak12-Oct-06 3:06
mveDave Kreskowiak12-Oct-06 3:06 
QuestionWhich is better? Pin
UltraCoder11-Oct-06 14:06
UltraCoder11-Oct-06 14:06 
AnswerRe: Which is better? Pin
Ray Cassick11-Oct-06 18:22
Ray Cassick11-Oct-06 18:22 
GeneralRe: Which is better? Pin
UltraCoder11-Oct-06 18:51
UltraCoder11-Oct-06 18:51 
QuestionChanging The Screensaver Through The Registry Pin
UltraCoder11-Oct-06 14:01
UltraCoder11-Oct-06 14:01 
AnswerRe: Changing The Screensaver Through The Registry Pin
Dave Kreskowiak12-Oct-06 1:50
mveDave Kreskowiak12-Oct-06 1:50 
GeneralRe: Changing The Screensaver Through The Registry Pin
UltraCoder12-Oct-06 7:51
UltraCoder12-Oct-06 7:51 
QuestionData adapter configuration wizard problem Pin
penguin500011-Oct-06 11:28
penguin500011-Oct-06 11:28 
AnswerRe: Data adapter configuration wizard problem Pin
Dave Sexton11-Oct-06 20:54
Dave Sexton11-Oct-06 20:54 
GeneralRe: Data adapter configuration wizard problem Pin
penguin500012-Oct-06 9:44
penguin500012-Oct-06 9:44 
QuestionFile Indexing Pin
UltraCoder11-Oct-06 11:19
UltraCoder11-Oct-06 11:19 
AnswerRe: File Indexing Pin
Dave Kreskowiak11-Oct-06 11:43
mveDave Kreskowiak11-Oct-06 11:43 

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.