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

Visual Basic

 
GeneralCombo box Pin
Yulianto.27-Apr-05 15:45
Yulianto.27-Apr-05 15:45 
GeneralRe: Combo box Pin
Dave Kreskowiak27-Apr-05 15:57
mveDave Kreskowiak27-Apr-05 15:57 
Generalvb6:codes to read/write sms using serial port Pin
AtcKit27-Apr-05 15:34
AtcKit27-Apr-05 15:34 
GeneralRe: vb6:codes to read/write sms using serial port Pin
Dave Kreskowiak27-Apr-05 15:51
mveDave Kreskowiak27-Apr-05 15:51 
Generalreading data from txt file Pin
Amanjot27-Apr-05 10:38
Amanjot27-Apr-05 10:38 
GeneralRe: reading data from txt file Pin
Brian Van Beek27-Apr-05 11:29
Brian Van Beek27-Apr-05 11:29 
GeneralRe: reading data from txt file Pin
Amanjot28-Apr-05 3:36
Amanjot28-Apr-05 3:36 
GeneralRe: reading data from txt file Pin
Fernando Soto27-Apr-05 16:36
Fernando Soto27-Apr-05 16:36 
Hi Amanjot;
Here is one way to do it.

' Array to hold each number in the file
Dim intArray(0) As Integer
' Line of numers read from file
Dim inputText As String
' String to hold each value from input line
Dim splitText(20) As String
' Index into integer array
Dim index As Integer = 0
' Size of integer array holding values
Dim arraySize As Integer = -1
Dim reader As StreamReader = New StreamReader("c:\temp\integerfile.txt")

Do
' Read a line of text from file
inputText = reader.ReadLine
' Parse the line of integers
splitText = inputText.Split(" ")
' Calculate the size need for new values
arraySize += splitText.Length
' Resize the array to hold new values
ReDim Preserve intArray(arraySize)
' Put each value into a unique variable
For Each numberString As String In splitText
intArray(index) = CInt(numberString)
index += 1
Next
' ChecK to see if there are any more input
Loop Until reader.Peek = -1

....

reader.Close()

I hope that this was of some help

-Fernando Smile | :)
GeneralDeleting record from text File VB6 Pin
husman27-Apr-05 10:38
husman27-Apr-05 10:38 
GeneralRe: Deleting record from text File VB6 Pin
Dave Kreskowiak27-Apr-05 15:44
mveDave Kreskowiak27-Apr-05 15:44 
GeneralRead a file from the web Pin
Martin@captivasystems27-Apr-05 8:26
Martin@captivasystems27-Apr-05 8:26 
GeneralRe: Read a file from the web Pin
Dave Kreskowiak27-Apr-05 15:42
mveDave Kreskowiak27-Apr-05 15:42 
QuestionIf anybody know? Pin
Mkanchha27-Apr-05 6:57
Mkanchha27-Apr-05 6:57 
AnswerRe: If anybody know? Pin
Dave Kreskowiak27-Apr-05 15:30
mveDave Kreskowiak27-Apr-05 15:30 
GeneralRe: If anybody know? Pin
Mkanchha27-Apr-05 17:18
Mkanchha27-Apr-05 17:18 
GeneralRe: If anybody know? Pin
Dave Kreskowiak28-Apr-05 7:58
mveDave Kreskowiak28-Apr-05 7:58 
QuestionAdding Items to Menu Control Arrays: How? Pin
Miles Tones27-Apr-05 5:33
Miles Tones27-Apr-05 5:33 
AnswerRe: Adding Items to Menu Control Arrays: How? Pin
Mike the Red27-Apr-05 8:42
Mike the Red27-Apr-05 8:42 
GeneralRe: Adding Items to Menu Control Arrays: How? Pin
Miles Tones27-Apr-05 9:15
Miles Tones27-Apr-05 9:15 
GeneralRe: Adding Items to Menu Control Arrays: How? Pin
Mike the Red27-Apr-05 9:58
Mike the Red27-Apr-05 9:58 
GeneralDeployment with SQL and CR Pin
Joey Picerno27-Apr-05 4:56
Joey Picerno27-Apr-05 4:56 
GeneralBrain Cramp... this should be simple, but I'm going nuts Pin
Mike the Red27-Apr-05 4:40
Mike the Red27-Apr-05 4:40 
GeneralRe: Brain Cramp... this should be simple, but I'm going nuts Pin
Len Miller27-Apr-05 5:38
Len Miller27-Apr-05 5:38 
GeneralRe: Brain Cramp... this should be simple, but I'm going nuts Pin
Mike the Red27-Apr-05 8:17
Mike the Red27-Apr-05 8:17 
GeneralRe: Brain Cramp... this should be simple, but I'm going nuts Pin
Len Miller27-Apr-05 10:34
Len Miller27-Apr-05 10:34 

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.