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 


Convert This Code to C#

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

Joined: 15 Aug 2009
Posts: 29

PostPosted: Mon Aug 24, 2009 8:54 pm    Post subject: Convert This Code to C# Reply with quote

Hi, i Need convert this code to C#, but i not can do... somebody can doing, please?.

Code:
  WindowProcess:=FindWindow(nil,'This Is The Window');
  if WindowProcess <> 0 then
  begin
    Icon.ShowBalloonHint('Program','ProcessWindow Is Open',bitInfo,10);
  end else exit;


I Hoope, your's Can Help Me. Embarassed
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Mon Aug 24, 2009 9:20 pm    Post subject: Reply with quote

If you can't convert some if statements on your own, I think it's time to stop copy / pasting and actually learn a little...


Code:
IntPtr hwnd = FindWindow(nil, "This is the window");
if(hwnd != 0)
   MessageBox.Show("ProcessWindow Is Open");
else
   blow_up_computer();


this is off the top of my head, I haven't touched C# in a while. You'll need to pinvoke FindWindow();


throw this somewhere in your declarations.
Code:
[DllImport("user32.dll", SetLastError = true)]
static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
Back to top
View user's profile Send private message
Morph.C
Cheater
Reputation: 0

Joined: 15 Aug 2009
Posts: 29

PostPosted: Mon Aug 24, 2009 10:08 pm    Post subject: Reply with quote

in fact, I make the delphi code, but i not know convert to C# ... I ask for more respect, I am not a lecher.

Thank you So much, for convert.
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