Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Programming
You last visited: Today at 01:57

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Global Hotkeys C# issue!

Discussion on Global Hotkeys C# issue! within the CO2 Programming forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
byte1918's Avatar
 
elite*gold: 0
Join Date: Jul 2005
Posts: 38
Received Thanks: 0
Global Hotkeys C# issue!

Hi.
I am trying to make a simple application in c#, and I need to make the hotkeys work when Conquer window has focus. I have managed to make the hotkeys work globally in windows with

Code:
public class User32
	{
		[DllImport("user32.dll")]
		public static extern bool RegisterHotKey(IntPtr hWnd,int id,int fsModifiers,int vlc);
		[DllImport("user32.dll")]
		public static extern bool UnregisterHotKey(IntPtr hWnd, int id);
	}
the code is longer

If anyone can give me a link or something from where to start from I will be very thankful.

Thanks in advance.
byte1918 is offline  
Old 07/16/2009, 15:35   #2
 
elite*gold: 20
Join Date: Aug 2007
Posts: 1,749
Received Thanks: 2,199
What kind of hotkeys are you talking about? The built-in Windows hotkeys, or something else?
IAmHawtness is offline  
Thanks
1 User
Old 07/16/2009, 16:23   #3
 
byte1918's Avatar
 
elite*gold: 0
Join Date: Jul 2005
Posts: 38
Received Thanks: 0
Quote:
Originally Posted by IAmHawtness View Post
What kind of hotkeys are you talking about? The built-in Windows hotkeys, or something else?
Well.. I'm speaking about custom hotkeys, so far my application does what I want it to do when I press ctrl+w(my hotkey of choice) but this works only while I am in windows, if I switch the focus to conquer window (opengl) my app can't listen for the hotkey event therefor nothing happens.

I want to make the hotkey work in conquer too.

Thx for answering though.

EDIT: Just tested and it seems it works when I'm in full screen but not when I'm in window mode, and I have no idea why.
byte1918 is offline  
Old 07/16/2009, 17:02   #4
 
elite*gold: 20
Join Date: Aug 2007
Posts: 1,749
Received Thanks: 2,199
Quote:
Originally Posted by byte1918 View Post
Well.. I'm speaking about custom hotkeys, so far my application does what I want it to do when I press ctrl+w(my hotkey of choice) but this works only while I am in windows, if I switch the focus to conquer window (opengl) my app can't listen for the hotkey event therefor nothing happens.

I want to make the hotkey work in conquer too.

Thx for answering though.

EDIT: Just tested and it seems it works when I'm in full screen but not when I'm in window mode, and I have no idea why.
Custom hotkeys? Like when you press ctrl+w, your program does something in CO?

If that's the case, you should try using GetAsyncKeyState API.

And if you want it only to work when the Conquer window is active, you could use GetForegroundWindow
IAmHawtness is offline  
Thanks
1 User
Old 07/16/2009, 17:27   #5
 
byte1918's Avatar
 
elite*gold: 0
Join Date: Jul 2005
Posts: 38
Received Thanks: 0
Thank you very much for your answer. I will take a look and see if it works. Atm I'm happy that for some odd reason my application works when in full screen. I usually play co in window mode, but when I'll use the app I will play in full screen mode and that's at gw, once per week. Btw it's not something worth releasing, it's just basic stuff anyone could do with enough spare time :P.

ty one more time.
byte1918 is offline  
Reply


Similar Threads Similar Threads
Hotkeys
11/27/2009 - AutoIt - 2 Replies
Hi Leutz, ich hab mich mal an AutoIt gewagt un das ist dabei rausgekommen: (Das es ein Spambot ist sieht man glaubich:D) Aber jetzt zu meiner Frage: Wie kann ich die Hotkeys dazu bringen den skript zu starten oder zu beenden?
Hotkeys ba??? /:)
05/22/2009 - Grand Chase Philippines - 1 Replies
how about registry ng pc hack engine....kasi baka dun nangaling ung hot keys dba??
Hotkeys
04/06/2009 - World of Warcraft - 1 Replies
Hey! Naja und zwar habr ich mir jetz nen Mage als Twink gemacht und naja hab bei dem bei den Leisten Hotkeys gmacht und will die bei meinem Main anders haben kann ich das irgendwo einstellen das die nur beim Twink so eingestellt sind? :confused: GreeZ Mara
Hotkeys
12/26/2007 - WarRock - 1 Replies
hi leute wollte mal fragen wie ich bei vb6 hotkeys einfügen kann. kann mir da wer weiterhelfen, weil hotkeys ja etwas praktischer sind, als den hack immer wieder aufzurufen^^
SV Hotkeys
07/04/2007 - Conquer Online 2 - 3 Replies
Dear fellow elitepvpers, I've had a very nice time using SV, especially in lab since everyone levels with Dragonballs...but I was wondering what the Scriptvessel hotkeys are and if I can change them. Eg: F1 = ? F2 = Potions? F3 = ? F4 = ? F5 = ? F6 = ? F7 = ?



All times are GMT +1. The time now is 01:58.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.