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 


[Vb.net] Event Happening Each ... [Solved]

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
I'm C.H.
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Dec 2006
Posts: 1000
Location: Sweden

PostPosted: Fri Jan 16, 2009 9:19 am    Post subject: [Vb.net] Event Happening Each ... [Solved] Reply with quote

I wanna know how to make an event happen each time a value is changed.
What I'm trying to do is a Checkbox which will change frame each time A HScrollbar changes it's value(when it's scrolled) if the checkbox is checked.

_________________
Omg. I need something to do...

*-* My Flash Trainers *-*

*-* My Mouse Vac Tut *-*



Last edited by I'm C.H. on Sun Jan 18, 2009 5:08 am; edited 1 time in total
Back to top
View user's profile Send private message
Skyone
Grandmaster Cheater
Reputation: 0

Joined: 10 Sep 2006
Posts: 508

PostPosted: Fri Jan 16, 2009 9:39 am    Post subject: Reply with quote

???

Last edited by Skyone on Wed Dec 23, 2009 9:08 am; edited 7 times in total
Back to top
View user's profile Send private message AIM Address MSN Messenger
I'm C.H.
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Dec 2006
Posts: 1000
Location: Sweden

PostPosted: Sat Jan 17, 2009 7:10 am    Post subject: Reply with quote

Anyone who knows?
_________________
Omg. I need something to do...

*-* My Flash Trainers *-*

*-* My Mouse Vac Tut *-*

Back to top
View user's profile Send private message
Stonehenge
Master Cheater
Reputation: 0

Joined: 03 Oct 2008
Posts: 280
Location: Unknown Jumphole

PostPosted: Sat Jan 17, 2009 8:36 am    Post subject: Reply with quote

Put your scroll bar on the form and double click on it which will take you to the code for the form and into a sub for when the scroll bar changes, then insert this code:
Code:

If CheckBox1.Checked = True Then
            Dim frame As Integer = HScrollBar1.Value()
End If


where CheckBox1 is the name of your check box, and HScrollBar1 is the name of your scroll bar.

You can actually do whatever you want between the If/End If, but I thought I might show you how to access the number property of the scroll bar all in one fell swoop, thus if you were using it to control the frame of a flash object, you would do this:
Code:

If CheckBox1.Checked = True Then
            Dim frame As Integer = HScrollBar1.Value()
            AxShockwaveFlash1.FrameNum() = frame
End If


Change the max value for the scroll bar in it's properties if you want. And remember to put all this code in the space that comes up when you double click on the scroll bar, leaving you with a final product of this:

Code:
Private Sub HScrollBar1_Scroll(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ScrollEventArgs) Handles HScrollBar1.Scroll
        If CheckBox1.Checked = True Then
            Dim frame As Integer = HScrollBar1.Value()
            AxShockwaveFlash1.FrameNum() = frame
        End If
End Sub

_________________
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