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 ME D:<] Visual Basic
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
WillPwnYou
Expert Cheater
Reputation: 0

Joined: 31 Jul 2007
Posts: 189

PostPosted: Sat Aug 11, 2007 2:08 pm    Post subject: [HELP ME D:<] Visual Basic Reply with quote

Can I make a command button open a new window? If so, whats the code and do I use a second form?
_________________
Back to top
View user's profile Send private message
Labyrnth
Moderator
Reputation: 10

Joined: 28 Nov 2006
Posts: 6301

PostPosted: Sat Aug 11, 2007 2:13 pm    Post subject: Reply with quote

You use a second form to open a new window.

1. Add a new form.
2. On form 1 and a button and then add this code.
Code:
Private Sub Command1_Click()
Form2.Show
End Sub
Back to top
View user's profile Send private message
WillPwnYou
Expert Cheater
Reputation: 0

Joined: 31 Jul 2007
Posts: 189

PostPosted: Sat Aug 11, 2007 2:15 pm    Post subject: Reply with quote

Now...
[HELP ME D:<] How do you rep?
xD

_________________
Back to top
View user's profile Send private message
Labyrnth
Moderator
Reputation: 10

Joined: 28 Nov 2006
Posts: 6301

PostPosted: Sat Aug 11, 2007 2:19 pm    Post subject: Reply with quote

Dont worry about a rep for me, Just got to work now Razz
Back to top
View user's profile Send private message
Kumori Guardian
I'm a spammer
Reputation: 0

Joined: 19 Jun 2007
Posts: 6517
Location: http://forum.cheatengine.org/viewtopic.php?t=452539

PostPosted: Sat Aug 11, 2007 2:40 pm    Post subject: Reply with quote

Speaking of Vb help, can some1 help me with Keyboard events?

I tried
Code:
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
        If e.KeyCode = Keys.Escape Then
            Button136.PerformClick()
            MsgBox("Now Stopped", MessageBoxIcon.Information)
        End If

and

Code:
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown

        Select Case e.KeyValue.ToString

            Case Windows.Forms.Keys.A

                Timer3.Enabled = False
                Timer4.Enabled = False
                Timer5.Enabled = False

            Case Windows.Forms.Keys.B

                Timer3.Enabled = False

            Case Windows.Forms.Keys.C

                Timer4.Enabled = False

            Case Windows.Forms.Keys.D

                Timer5.Enabled = False

        End Select

    End Sub


Nothing works, and i'm using Visual Basic 2008 Express Edition Wink

Waht i'm basicly trying to do is when i press a key it stops my timer

_________________
Back to top
View user's profile Send private message Visit poster's website
Labyrnth
Moderator
Reputation: 10

Joined: 28 Nov 2006
Posts: 6301

PostPosted: Sun Aug 12, 2007 10:58 am    Post subject: Reply with quote

Far as i know this is how to stop and start timers
Code:
Private Sub cmdStart_Click()

    Timer1.Enabled = True 'Starts the time To start counting
   
End Sub


Private Sub cmdStop_Click()

    Timer1.Enabled = False 'Stops the timer
   
End Sub
Back to top
View user's profile Send private message
i__h4x
Grandmaster Cheater Supreme
Reputation: 0

Joined: 09 Jun 2007
Posts: 1005
Location: i__<3's__wpe

PostPosted: Sun Aug 12, 2007 11:19 am    Post subject: Reply with quote

SCRN, i already tried to explain.
That code is correct, if you try it on a blank form it will work. The reason it dosnt work is because that is the handle for MyBase.KeyDown.

You have the flashcontrol focused and so that is what needs to handle the key event, not the form.

_________________
Mes'a back!
Back to top
View user's profile Send private message
Kumori Guardian
I'm a spammer
Reputation: 0

Joined: 19 Jun 2007
Posts: 6517
Location: http://forum.cheatengine.org/viewtopic.php?t=452539

PostPosted: Sun Aug 12, 2007 11:47 am    Post subject: Reply with quote

so all i need to change is

Code:
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown


?

_________________
Back to top
View user's profile Send private message Visit poster's website
i__h4x
Grandmaster Cheater Supreme
Reputation: 0

Joined: 09 Jun 2007
Posts: 1005
Location: i__<3's__wpe

PostPosted: Sun Aug 12, 2007 11:51 am    Post subject: Reply with quote

No because i also said that the flash control dosnt have a keydown event handler.
http://msdn2.microsoft.com/en-us/library/k2kt7a7y(vs.80).aspx

Thats a short thing on writing event handlers, i didnt really read it but it might help, if not google something like 'Create event handle visual basic .net'

_________________
Mes'a back!
Back to top
View user's profile Send private message
Kumori Guardian
I'm a spammer
Reputation: 0

Joined: 19 Jun 2007
Posts: 6517
Location: http://forum.cheatengine.org/viewtopic.php?t=452539

PostPosted: Sun Aug 12, 2007 12:05 pm    Post subject: Reply with quote

in other words it's impossible to make 1 Shocked
_________________
Back to top
View user's profile Send private message Visit poster's website
i__h4x
Grandmaster Cheater Supreme
Reputation: 0

Joined: 09 Jun 2007
Posts: 1005
Location: i__<3's__wpe

PostPosted: Sun Aug 12, 2007 12:13 pm    Post subject: Reply with quote

No. Its not.
Right, give me till 8pm and ill have done it (thats in 20 mins.)

_________________
Mes'a back!
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: Sun Aug 12, 2007 12:16 pm    Post subject: Reply with quote

SCRN wrote:
in other words it's impossible to make 1 Shocked

It's not... I've done it before in VB6 (Which is what I use)
Back to top
View user's profile Send private message
Tosy
How do I cheat?
Reputation: 0

Joined: 20 Jul 2007
Posts: 5

PostPosted: Sun Aug 12, 2007 12:19 pm    Post subject: Reply with quote

Zomg add a form rename it form2 and add this code to Command
Form2.Visible = True 'thats all
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: Sun Aug 12, 2007 12:20 pm    Post subject: Reply with quote

_ToSy_ wrote:
Zomg add a form rename it form2 and add this code to Command
Form2.Visible = True 'thats all

You would use .Show, not .Visible for opening new forms.
Back to top
View user's profile Send private message
i__h4x
Grandmaster Cheater Supreme
Reputation: 0

Joined: 09 Jun 2007
Posts: 1005
Location: i__<3's__wpe

PostPosted: Sun Aug 12, 2007 12:36 pm    Post subject: Reply with quote

ok SCRN its done.
Ill post it in the dragonfable section later.

_________________
Mes'a back!
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
Goto page 1, 2  Next
Page 1 of 2

 
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