Click here to Skip to main content
15,897,518 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionActive X Control in VB.Net 2005 Pin
rain raj13-May-08 20:05
rain raj13-May-08 20:05 
AnswerRe: Active X Control in VB.Net 2005 Pin
Arjun Marwaha13-May-08 21:28
Arjun Marwaha13-May-08 21:28 
Questionvalue null is not valid stream Pin
Socheat.Net13-May-08 18:45
Socheat.Net13-May-08 18:45 
AnswerRe: value null is not valid stream Pin
Christian Graus13-May-08 19:07
protectorChristian Graus13-May-08 19:07 
Questiondata grid update Pin
asha_s13-May-08 10:05
asha_s13-May-08 10:05 
AnswerRe: data grid update Pin
C1AllenS13-May-08 10:24
C1AllenS13-May-08 10:24 
GeneralRe: data grid update Pin
asha_s14-May-08 0:41
asha_s14-May-08 0:41 
Questioncan't load text to a form from a file Pin
winsane13-May-08 8:36
winsane13-May-08 8:36 
This doesn't seem like it should be hard but all I get is a blank form. Is there an error in my syntax? I checked, the file does exist at that location and it does contain text.


Imports System
Imports System.IO
Imports System.Text

Public Class Form3

Public Class Test
Public Shared Sub Main()
Dim path As String = "c:\temp\mytest.txt"
If File.Exists(path) = False Then
' Create a file to write to.
Dim sw As StreamWriter = File.CreateText(path)
sw.WriteLine("Hello")
sw.WriteLine("And")
sw.WriteLine("Welcome")
sw.Flush()
sw.Close()
End If

' Open the file to read from.
Dim sr As StreamReader = File.OpenText(path)
Do While sr.Peek() >= 0
Console.WriteLine(sr.ReadLine())
Loop
sr.Close()
End Sub
End Class
End Class

-Live long and prosper

AnswerRe: can't load text to a form from a file Pin
C1AllenS13-May-08 10:15
C1AllenS13-May-08 10:15 
AnswerRe: can't load text to a form from a file Pin
Christian Graus13-May-08 11:52
protectorChristian Graus13-May-08 11:52 
AnswerRe: can't load text to a form from a file Pin
Ed.Poore13-May-08 13:19
Ed.Poore13-May-08 13:19 
Questionstring checking Pin
asha_s13-May-08 7:45
asha_s13-May-08 7:45 
AnswerRe: string checking Pin
C1AllenS13-May-08 8:27
C1AllenS13-May-08 8:27 
GeneralRe: string checking Pin
asha_s13-May-08 9:10
asha_s13-May-08 9:10 
QuestionvbScript - I want to know howe I declare a Public variabel... [modified] Pin
keda13-May-08 5:07
keda13-May-08 5:07 
Questionxml in .net Pin
subbu.sk13-May-08 4:40
subbu.sk13-May-08 4:40 
AnswerRe: xml in .net Pin
Christian Graus13-May-08 11:54
protectorChristian Graus13-May-08 11:54 
QuestionCommunication between multiple instances of a program with Shared members and events Pin
bixtra13-May-08 4:27
bixtra13-May-08 4:27 
AnswerRe: Communication between multiple instances of a program with Shared members and events Pin
Christian Graus13-May-08 11:54
protectorChristian Graus13-May-08 11:54 
GeneralRe: Communication between multiple instances of a program with Shared members and events Pin
bixtra13-May-08 20:35
bixtra13-May-08 20:35 
QuestionConvert RTF to PDF programmatically Pin
quioske13-May-08 2:08
quioske13-May-08 2:08 
AnswerRe: Convert RTF to PDF programmatically Pin
Ed.Poore13-May-08 13:17
Ed.Poore13-May-08 13:17 
QuestionRow header Numbering Pin
Mohammad Al Hoss13-May-08 1:19
Mohammad Al Hoss13-May-08 1:19 
AnswerRe: Row header Numbering Pin
Rupesh Kumar Swami13-May-08 1:38
Rupesh Kumar Swami13-May-08 1:38 
GeneralRe: Row header Numbering Pin
Mohammad Al Hoss13-May-08 2:02
Mohammad Al Hoss13-May-08 2:02 

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.