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 


here is your answer noob attack

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
TheIndianGuy
Advanced Cheater
Reputation: 102

Joined: 14 Jan 2007
Posts: 88

PostPosted: Thu Aug 23, 2007 4:03 pm    Post subject: here is your answer noob attack Reply with quote

ok i figured out how to do it.

make sure you put this code into your form and change the method to keydown. also make sure to change the keypreview to true on the properties window.

Code:
if e.keycode = keys.a and e.modifiers = keys.control then
messagebox.show("hello world")
e.handled = true
end if


thats just an example with a messagebox now you figure out how to do it with a button Very Happy

edit: here is how to do it with a button i guess i will give you the answer this time

create a button, lets use crtl+A again

so on form1 make sure keypreview = true

Code:
    Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
        If e.KeyCode = Keys.H And e.Modifiers = Keys.Control Then
            Button1.Select()
            e.Handled = True
        End If
    End Sub


Code:
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        MessageBox.Show("Hello World")
        KeyPreview = True
    End Sub
this is if the user wants to click the button it shows the message hello world

Code:
    Private Sub Button1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Button1.KeyPress
        MessageBox.Show("Hello World")
        KeyPreview = True
    End Sub
this is so if the user wants to press crtl+a to show the message hello world

now you have 2 examples of how to do this but the answer you were looking for was the button answer so please enjoy and i wouldnt mind that rep like you promessed Very Happy
Back to top
View user's profile Send private message
MadDoom
Cheater
Reputation: 0

Joined: 27 Dec 2006
Posts: 38

PostPosted: Fri Aug 24, 2007 3:25 am    Post subject: Reply with quote

what language and what it is doing?
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: Fri Aug 24, 2007 3:39 am    Post subject: Reply with quote

MadDoom wrote:
what language and what it is doing?

VB, and I think it's for hotkeys.
Back to top
View user's profile Send private message
assaf84
Expert Cheater
Reputation: 0

Joined: 03 Oct 2006
Posts: 238

PostPosted: Fri Aug 24, 2007 3:54 am    Post subject: Reply with quote

Looks like a hot key in VB
Back to top
View user's profile Send private message
TheIndianGuy
Advanced Cheater
Reputation: 102

Joined: 14 Jan 2007
Posts: 88

PostPosted: Sat Aug 25, 2007 10:12 pm    Post subject: Reply with quote

yeah its using hotkeys in vb 2005
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