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 


WM_ Keystorkes in C#?

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

Joined: 03 Oct 2006
Posts: 343

PostPosted: Sat Dec 29, 2007 3:08 pm    Post subject: WM_ Keystorkes in C#? Reply with quote

Well, im still in a conflict about how to solve it o-o

Umm, As Symbol told me i tried to use the WinUser converted to C#,
I defined it as
WinUser.Win32 joosuck = new WinUser.Win32();

While its a public class Win32
and the namespace is WinUser.

the WM_KEYDOWN is defined as 0x0100 but its still 'undefined' when i click build. Its like um, still not understanding how to use that keystroke (while using PostMsg).

Thanks in advance ;D
Back to top
View user's profile Send private message MSN Messenger
samuri25404
Grandmaster Cheater
Reputation: 7

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

PostPosted: Sun Dec 30, 2007 12:56 pm    Post subject: Reply with quote

Why not just create an enum and define all the keystrokes in there?

You could do something like this:

Code:

[DllImport("thedll"), SetLastError = true]
private static extern void send_keys_or_whatever(int keycode);

private enum WM_Keystrokes
{
     a = 0x04, //I don't know this stuff, I'm just putting in random numbers
     b = 0x05
}

private void SendSomething()
{
    WM_Keystrokes ks = WM_Keystrokes.a;
    int ToSend = (int)ks;
    send_keys_or_whatever(ToSend);
}


You'll obviously have to look up the method, dll, and key values, but I get the point accross, don't I?

_________________
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
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