Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


VB6 open a file from a path

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
OSIRIS
Grandmaster Cheater
Reputation: 0

Joined: 27 Aug 2006
Posts: 654

PostPosted: Thu Mar 13, 2008 3:30 pm    Post subject: Re: VB6 open a file from a path Reply with quote

micksemps wrote:
how do i open a file
i want to open a wordpad file in my desktop


didnt you just ask that a second ago Shocked \

but anyway use this code

Code:

Dim FILE_NAME As String = "C:\test.txt"

Dim objReader As New System.IO.StreamReader(FILE_NAME)
 TextBox1.Text = objReader.ReadToEnd

objReader.Close()
Back to top
View user's profile Send private message
Pseudo Xero
I post too much
Reputation: 0

Joined: 16 Feb 2007
Posts: 2607

PostPosted: Thu Mar 13, 2008 3:32 pm    Post subject: Re: VB6 open a file from a path Reply with quote

micksemps wrote:
how do i open a file
i want to open a wordpad file in my desktop

Open it in the default program for wordpad files?

_________________
haxory' wrote:
can't VB do anything??
windows is programmed using VB right? correct me if im wrong.

so all things in windows you have like the start menu is a windows form too.
Back to top
View user's profile Send private message
OSIRIS
Grandmaster Cheater
Reputation: 0

Joined: 27 Aug 2006
Posts: 654

PostPosted: Thu Mar 13, 2008 3:33 pm    Post subject: Reply with quote

The code I gave put the text of C:\test.txt into textbox1
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Thu Mar 13, 2008 3:34 pm    Post subject: Reply with quote

mageknight wrote:
The code I gave put the text of C:\test.txt into textbox1


Too bad it requires the .NET framework and won't work with VB6
Back to top
View user's profile Send private message
OSIRIS
Grandmaster Cheater
Reputation: 0

Joined: 27 Aug 2006
Posts: 654

PostPosted: Thu Mar 13, 2008 3:34 pm    Post subject: Reply with quote

ohhhh VB6.... I thought it was 2008. Smile my bad
Back to top
View user's profile Send private message
poppyu
Expert Cheater
Reputation: 0

Joined: 29 Aug 2007
Posts: 147

PostPosted: Thu Mar 13, 2008 3:37 pm    Post subject: Reply with quote

can anyone help me?
i want to open a file called variables.txt
and its on my desktop
Back to top
View user's profile Send private message
Pseudo Xero
I post too much
Reputation: 0

Joined: 16 Feb 2007
Posts: 2607

PostPosted: Thu Mar 13, 2008 3:44 pm    Post subject: Reply with quote

micksemps wrote:
can anyone help me?
i want to open a file called variables.txt
and its on my desktop

Open the file, or read the text?

_________________
haxory' wrote:
can't VB do anything??
windows is programmed using VB right? correct me if im wrong.

so all things in windows you have like the start menu is a windows form too.
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Thu Mar 13, 2008 4:37 pm    Post subject: Reply with quote

Check out this page to create a Common Dialog via the FileSystemObject:
http://mc-computing.com/Languages/VisualBasic/VBFileIO.htm

I dislike this method but it seems to be popular with people. There are also API that you can use which you can find an example over at:

www.vbaccelerator.com

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites