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 


Shortcuts in C#

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

Joined: 02 Feb 2007
Posts: 350

PostPosted: Sat Feb 23, 2008 11:42 am    Post subject: Shortcuts in C# Reply with quote

I need help creating a shortcut key.

If i pres F2 i want it to show a dialog saying Complete.
How can i do this?

i tried this but it didnt work idk what im doing wrong lol.

if (e.keycode = 71)
{
MessageBox.Show("COmplete");
}

Thank you.

Lol i never worked with shortcuts until now please help me.

_________________
NOOBXOR = Comes from the root words noob and haxor, hence noobxor.
word created by: newb09 & ferenzo
Back to top
View user's profile Send private message AIM Address
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Sat Feb 23, 2008 11:56 am    Post subject: Reply with quote

If you want it to work outside the program, use a keyboard hook (I've shown one in a GP+ post).

Otherwise, just do a Form_KeyDown event.

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
newb09
Master Cheater
Reputation: 0

Joined: 02 Feb 2007
Posts: 350

PostPosted: Sat Feb 23, 2008 12:01 pm    Post subject: Reply with quote

samuri25404 wrote:
If you want it to work outside the program, use a keyboard hook (I've shown one in a GP+ post).

Otherwise, just do a Form_KeyDown event.


do you have a link if not i can search i got the keydown and i want it to run when another application is running no matter what app it is.

_________________
NOOBXOR = Comes from the root words noob and haxor, hence noobxor.
word created by: newb09 & ferenzo
Back to top
View user's profile Send private message AIM Address
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Sat Feb 23, 2008 12:09 pm    Post subject: Reply with quote

I don't know quite what you're getting at.

Do you mean that you want the application to recieve the keystroke even when it's not being focused?

If so, you need to use a KeyBoard hook.

Otherwise, just go to the Form Designer, select the title bar of your form (to select it as the control), go to the Events (it's a lightning bolt symbol) in the properties, and double click on "Form_Keydown" or something like that.

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
newb09
Master Cheater
Reputation: 0

Joined: 02 Feb 2007
Posts: 350

PostPosted: Sat Feb 23, 2008 12:10 pm    Post subject: Reply with quote

samuri25404 wrote:
I don't know quite what you're getting at.

Do you mean that you want the application to recieve the keystroke even when it's not being focused?

If so, you need to use a KeyBoard hook.

Otherwise, just go to the Form Designer, select the title bar of your form (to select it as the control), go to the Events (it's a lightning bolt symbol) in the properties, and double click on "Form_Keydown" or something like that.


yes thats what i meant. receive the key when not focused. So if im running firefox and i press the key it will do what the code says and if im in IE and i press the key it will do that also.

_________________
NOOBXOR = Comes from the root words noob and haxor, hence noobxor.
word created by: newb09 & ferenzo
Back to top
View user's profile Send private message AIM Address
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Sat Feb 23, 2008 12:12 pm    Post subject: Reply with quote

Ok, you need a keyboard hook.

Go to the General Programming + section, and check out my post on creating a Static Keyboard Hook in C#.

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
newb09
Master Cheater
Reputation: 0

Joined: 02 Feb 2007
Posts: 350

PostPosted: Sat Feb 23, 2008 12:14 pm    Post subject: Reply with quote

ok thanks for your help.
_________________
NOOBXOR = Comes from the root words noob and haxor, hence noobxor.
word created by: newb09 & ferenzo
Back to top
View user's profile Send private message AIM Address
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