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 


Controls One Form From Another (Trainer) Tutorial VB2005

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

Joined: 25 Jun 2008
Posts: 109

PostPosted: Thu Jul 31, 2008 9:06 pm    Post subject: Controls One Form From Another (Trainer) Tutorial VB2005 Reply with quote

To be able to control form1 from form2; we first must pass the references to form2 or give access to form2 to control form1. For this example; i'm going to use Sword and Sandal 2. I'm assuming you know how to add flash object to vb, get flash loaded with force play, make buttons and experiences call variables... So I'm going to skip those steps...


Make two forms. Form 1 and 2. On Form1, make flash object with a button as below.



Code:

Public Class Form1
    Inherits System.Windows.Forms.Form

    Public myCaller As Form1

    Dim myForm As Form2


Go back to Form1 design view and double click on Button. Add this codes:

Code:


    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        If myForm Is Nothing Then
            myForm = New Form2
            myForm.myCaller = Me
        End If
        myForm.Show()
    End Sub

End Class


This will display form2...



Now Form1 is finish, Continue to Form2 and make a button, Call it Infinite Health.

Example:


Click view codes and enter this codes:
Code:

Public Class Form2
    Inherits System.Windows.Forms.Form
    Public myCaller As Form1


Now Go back to Form2 design view; double click on the button and put this codes:

Code:

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Call myCaller.Flash.Movie.ToString()
        Call myCaller.Flash.SetVariable("game.hero.hitpoints", 9999)
    End Sub


The first part links the two forms together and the second part, it puts the variable from form1 as string to be used in form2. This is it; so go ahead and test your trainer and see how it is... rep+ if you think it's useful!

note: It took me times to figure this out so I'm just putting it up incase I forget things like this...

_________________
Back to top
View user's profile Send private message MSN Messenger
kitterz
Grandmaster Cheater Supreme
Reputation: 0

Joined: 24 Dec 2007
Posts: 1268

PostPosted: Thu Jul 31, 2008 10:41 pm    Post subject: Reply with quote

Im no expert in vb, but this seems to be the most obvious and easiest things to learn/do.

But nice tut anyways.
Back to top
View user's profile Send private message Send e-mail
Orbit
Advanced Cheater
Reputation: 0

Joined: 09 Dec 2007
Posts: 74

PostPosted: Sat Aug 02, 2008 5:23 am    Post subject: Reply with quote

This is really easy though but still there may be people who dont know this

As it took you time writing i'l +rep you Smile

_________________
VB2008 Programmer Smile
Back to top
View user's profile Send private message
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