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 


[HELP]VB.net Call function from other sub

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
B1ackMarket
Newbie cheater
Reputation: 0

Joined: 22 Dec 2011
Posts: 12

PostPosted: Thu Jul 05, 2012 8:12 pm    Post subject: [HELP]VB.net Call function from other sub Reply with quote

Hello, i'm having an issue and im thinking it should be simple but im confused.

I want to read and write a value at the same time. which is simple. however on button press i want my app to read the value once and not repeatedly and then have my timer write it.

My problem is that i can't call that function in a different sub.

So.. button1 reads address and starts timer1

Timer1 writes what button1 reads.

My value is dynamic and i want it to be so i don't want the timer to keep reading it. only writing it.

I'de be fine doing this with a hidden lable or textbox too but i just cant get it to work.
Back to top
View user's profile Send private message
Pingo
Grandmaster Cheater
Reputation: 8

Joined: 12 Jul 2007
Posts: 571

PostPosted: Sat Jul 07, 2012 5:05 pm    Post subject: Reply with quote

Maybe something like this.
Store two variable on your form

Code:
Dim WasRead As Boolean
Dim Value As Object


Im not sure exactly what you want but this is just a rough idea.
On your timer do something like

Code:
        If Not WasRead Then
            Value = "Some Value"
            WasRead = True
        End If
        'Write the Value

So the value is only read once and will write continuously.

_________________
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