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

Visual Basic

 
GeneralRe: File associations & File Types Editor Pin
nvmoss14-Apr-04 3:40
nvmoss14-Apr-04 3:40 
GeneralRe: File associations & File Types Editor Pin
Dave Kreskowiak14-Apr-04 4:26
mveDave Kreskowiak14-Apr-04 4:26 
GeneralRe: File associations & File Types Editor Pin
nvmoss14-Apr-04 5:23
nvmoss14-Apr-04 5:23 
GeneralRe: File associations & File Types Editor Pin
Dave Kreskowiak14-Apr-04 8:40
mveDave Kreskowiak14-Apr-04 8:40 
GeneralRe: File associations & File Types Editor Pin
Heath Stewart8-Apr-04 8:50
protectorHeath Stewart8-Apr-04 8:50 
GeneralPass Server Exception to Client proxy Pin
Anonymous8-Apr-04 2:46
Anonymous8-Apr-04 2:46 
GeneralWrite into a text file Pin
Daminda8-Apr-04 0:33
Daminda8-Apr-04 0:33 
GeneralRe: Write into a text file Pin
Dave Kreskowiak8-Apr-04 2:16
mveDave Kreskowiak8-Apr-04 2:16 
You can't replace just the one line without rewriting the entire text file. The reason for this is text files have records of varying lengths.
    Imports System.IO
    Imports System.Text
 
    Dim srcFile As New StreamReader("SourceFile.txt")
    Dim newFile As New StreamWriter("NewFile.txt")
    Dim inText As String
    Dim intLineCount As Integer = 1
 
    inText = srcFile.ReadLine()
    While Not inText Is Nothing
        If intLineCount <> 2 Then
            newFile.WriteLine(inText)
        Else
            newFile.WriteLine("New Text To Replace Line 2")
        End If
    End While
    srcFile.Close()
    newFile.Close()
 
    File.Delete("SourceFile.txt")
    File.Move("NewFile.txt", "SourceFile.txt")


RageInTheMachine9532
GeneralRe: Write into a text file Pin
Nadroj8-Apr-04 3:03
Nadroj8-Apr-04 3:03 
Generalanyone can provide simple code for printing??VB.NET Pin
MJay7-Apr-04 21:26
MJay7-Apr-04 21:26 
Generalmultiple projects in a solution Pin
PaleyX7-Apr-04 13:50
PaleyX7-Apr-04 13:50 
GeneralRe: multiple projects in a solution Pin
Dwayne J. Baldwin7-Apr-04 15:30
Dwayne J. Baldwin7-Apr-04 15:30 
GeneralRe: multiple projects in a solution Pin
PaleyX7-Apr-04 16:20
PaleyX7-Apr-04 16:20 
GeneralRe: multiple projects in a solution Pin
PaleyX7-Apr-04 16:54
PaleyX7-Apr-04 16:54 
GeneralRe: multiple projects in a solution Pin
PaleyX8-Apr-04 0:16
PaleyX8-Apr-04 0:16 
GeneralRe: multiple projects in a solution Pin
Dave Kreskowiak8-Apr-04 2:38
mveDave Kreskowiak8-Apr-04 2:38 
GeneralRe: multiple projects in a solution Pin
PaleyX9-Apr-04 1:48
PaleyX9-Apr-04 1:48 
GeneralRe: multiple projects in a solution Pin
Serge Lobko-Lobanovsky12-Apr-04 0:37
Serge Lobko-Lobanovsky12-Apr-04 0:37 
GeneralRemoving service Pin
Lord_Kaos7-Apr-04 10:00
Lord_Kaos7-Apr-04 10:00 
QuestionHourGlass??? Pin
hounetdev7-Apr-04 5:44
hounetdev7-Apr-04 5:44 
AnswerRe: HourGlass??? Pin
Dave Kreskowiak7-Apr-04 5:52
mveDave Kreskowiak7-Apr-04 5:52 
Generalremove a name from list/combo box Pin
GaryKoh7-Apr-04 4:31
GaryKoh7-Apr-04 4:31 
GeneralRe: remove a name from list/combo box Pin
itmpras7-Apr-04 5:03
itmpras7-Apr-04 5:03 
GeneralRe: remove a name from list/combo box Pin
GaryKoh7-Apr-04 16:26
GaryKoh7-Apr-04 16:26 
GeneralRe: remove a name from list/combo box Pin
itmpras7-Apr-04 16:34
itmpras7-Apr-04 16: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.