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 


Visual basic (help)

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

Joined: 20 Nov 2007
Posts: 287

PostPosted: Sat Feb 02, 2008 4:13 pm    Post subject: Visual basic (help) Reply with quote

Hey guys, I need a little bit of help...
Ok, so I made a bat coder (A more friendly batch coder) and my load feature isn't working properly. It only loads the first line of code... I would give you the code that I'm using, but I'm on my laptop, and my Mom is using the comp with visual basic on it. But can you help me? Give me a code to make it load all the lines?
I have the text as multiline. So I don't know what the problem is. =[

(Please be sure that it actually pops up with the open thing, not just have it typed in there) (How to do that, is using the commondialog...)
Thanks.

_________________

Sciextron made the userbar up here, Rep him =D

[img]http://i145.photobucket.com/albums/r225/Michaell61/header.gif[/img] <---Visit theprocoders today!
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: Sat Feb 02, 2008 4:45 pm    Post subject: Reply with quote

I assume you mean reading the files contents is failing and only loading the first line? If so, try this code instead:

Code:
Option Explicit

Private Sub Command1_Click()

    '// Setup Path For File
    Dim strFilePath As String
    Dim cDlg As cCommonDialog
    Set cDlg = New cCommonDialog
    If cDlg.VBGetOpenFileName(strFilePath, , , , , , , , App.Path, "Open A File", , , 0) Then
        If strFilePath = "" Then Exit Sub '// No File Selected
    End If
   
    '// Obtain Availible File Number
    Dim fFile As Integer
    fFile = FreeFile
   
    '// Open And Read File
    Dim strFileText As String
    Open strFilePath For Input As fFile
        strFileText = Input(LOF(fFile), fFile)
    Close fFile
   
    Text1.Text = strFileText
   
End Sub


Attached is the class I used. (Credits to whom ever wrote the class cause I didn't. Don't remember where I got it either.)



The Extension 'rar' was deactivated by an board admin, therefore this Attachment is not displayed.


_________________
- 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