is there any code for opening a file without using any dialogbox? directly
zoraster01
0
Newbie Poster
Recommended Answers
Jump to PostYes: StreamReader
System.IO.StreamReaderExample:
Imports System.IO Module mod378486 Sub ReadFile() Dim strData As String Dim fileIn As New StreamReader("c:\science\test.txt") While Not (fileIn.EndOfStream) strData = fileIn.ReadLine() Console.WriteLine(strData) End While fileIn.Close() End Sub Sub Main() ReadFile() End Sub End Module
All 4 Replies
thines01
401
Postaholic
Team Colleague
Featured Poster
GeekByChoiCe
152
Practically a Master Poster
Featured Poster
zoraster01
0
Newbie Poster
GeekByChoiCe
152
Practically a Master Poster
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.