put this in you constructor code: this.Enter += new System.EventHandler(this.MainForm_Enter); And this to handle the event: private void MainForm_Enter(object sender, System.EventArgs e) { //put any code here to handle the enter key } Cheers.
Lapje
Posts
-
Keyboard control -
Compile as 1.0 on 1.1 FWIf you read the info behind that link, you would know it IS possible to compile 1.0 at a 1.1 framework. In VS, go to your project properties, and select 1.0 at 'supported runtimes'. Althought you said it wasn't possible, you helped me well. :) Cheers, Theo
-
Compile as 1.0 on 1.1 FW1. I'm using VS 2003 Pro 2. I'm almost sure it can be done in commandline, I only don't know how.
-
Compile as 1.0 on 1.1 FWI want to compile my application as a Framework 1.0 app on Framework 1.1. This is not because I'm too lazy to install 1.1, but Windows MCE requires it. I guess I need some command line options, but can't find it in MSDE. Please help me out. Theo
-
USB device eventYou should start using unmanaged code then, kernel32.dll I think. You could also use user32.dll to read system messages. Search http://www.pinvoke.net for sample code.
-
short/easy questionThis code does not work :(( Keep in mind the AudioMixer is an interface, not a class.
-
short/easy questionI'm having problems with a get/set property, and I want to know how to use it. Declaration in the library where it is says this: public abstract new bool Mute [ get, set ] Member of Microsoft.MediaCenter.Extensibility.AudioMixer Thanks in advance, Theo
-
Get window handleLook at this: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/getforegroundwindow.asp You can use the Spy++ tool in Visual Studio to get the lpClassName. You could also use this tool: http://www.codeproject.com/dialog/windowfinder.asp
-
TAB key problem in datagridTo me this sounds as a problem with your tabindex. Set a proper tabindex property to each object, and it will work correctly.
-
Place an ICON in a Datagrid cellWhy don't you try to change the background of these cells into green or red? I Don't know it it's possible, but it would be easier if it is...
-
Muting soundA good sleep does good on you thinking. I found out my own how to solve this problem. Just emulate the Mute button on your keyboard, and it will do ;)
-
got lParam, what to do now?Found a nice sample code: http://blogs.simplifi.com/brucet/downloads/remotecontrolsample.zip It may help some others as well.
-
Muting soundJust tried the dx sdk, but it seems it cannot handle system volume or something :S Going for the lib now :)
-
Muting soundHi, I want to be able to mute and unmute sound in Windows from my C# app. However, I have no idea where to start. Can someone give me some good links or sample code? Thanks in advance
-
got lParam, what to do now?Hi, I'm trying to read the input of my IR Controller by raw input. I managed to get lParam (pointer) and some other variables out of it, and now I want to extract it to useable data. I'm now able to make a difference between WM_INPUT of some other type, but there are like 10 keys on the remote using WM_INPUT. lParam seems the only parameter containing the info I need... Thanks in advance.
-
raw WM_INPUT for IR ControllerDoes someone have experience reading WM_INPUT info? I already know I need to use user32.dll, I only have no idea HOW. There are masses of tutorials in c or c++ on this subject, but just a few in C#. I'm a programmer newbe, so I like code with some explanation :-D Thanks in advance.
-
Global Hook on IR controlThanks, I'll go find some stuff on keyboard hooks then.
-
Global Hook on IR controlHi, I used the tutor from microsoft to get messages from my IR Control (link). The code works fine, but when the window loses focus, it doesn't work anymore. I need this code to work also when the program doesn't have focus (global hook?). Thanks in advance.