Click here to Skip to main content
15,924,195 members
Home / Discussions / C#
   

C#

 
QuestionDetecting when one side of a Socket Connection Closes Pin
Kurt _B27-Jul-06 4:22
Kurt _B27-Jul-06 4:22 
AnswerRe: Detecting when one side of a Socket Connection Closes Pin
Not Active27-Jul-06 5:37
mentorNot Active27-Jul-06 5:37 
GeneralRe: Detecting when one side of a Socket Connection Closes Pin
Kurt _B27-Jul-06 6:20
Kurt _B27-Jul-06 6:20 
Questionkey down in windows forms (C# 2.0) [modified] Pin
C-Scharbe27-Jul-06 3:56
C-Scharbe27-Jul-06 3:56 
AnswerRe: key down in windows forms (C# 2.0) Pin
Ilia Blank27-Jul-06 4:06
Ilia Blank27-Jul-06 4:06 
GeneralRe: key down in windows forms (C# 2.0) Pin
C-Scharbe27-Jul-06 5:14
C-Scharbe27-Jul-06 5:14 
GeneralRe: key down in windows forms (C# 2.0) Pin
Ilia Blank27-Jul-06 5:47
Ilia Blank27-Jul-06 5:47 
GeneralRe: key down in windows forms (C# 2.0) Pin
Ilia Blank27-Jul-06 6:26
Ilia Blank27-Jul-06 6:26 
You can read about windows hooks in .Net here <a href="http://msdn.microsoft.com/msdnmag/issues/02/10/CuttingEdge/">http://msdn.microsoft.com/msdnmag/issues/02/10/CuttingEdge/</a>[<a href="http://msdn.microsoft.com/msdnmag/issues/02/10/CuttingEdge/" target="_blank" title="New Window">^</a>]

Use WH_KEYBOARD when installing the hook procedure with SetWindowsHookEx

Use following code to detect key down in your hook

static readonly int WM_KEYDOWN = 256,

public Int32 KeyboardProc(int code, Int32 wParam, Int32 lParam)
{
if ((Int32)wParam == (Int32)WM_KEYDOWN )
{
// do processing
}
// do not forget to call next hook !!!!!!!!!!!!
// CallNextHookEx is win32 api that can be loaded to .Net
// using dll import like they did with setwindowshookex in example
return CallNextHookEx(hHook, code, wParam, lParam);
}




AnswerRe: key down in windows forms (C# 2.0) Pin
darkelv27-Jul-06 5:59
darkelv27-Jul-06 5:59 
GeneralRe: key down in windows forms (C# 2.0) Pin
Ilia Blank27-Jul-06 6:32
Ilia Blank27-Jul-06 6:32 
GeneralRe: key down in windows forms (C# 2.0) Pin
C-Scharbe8-Aug-06 21:31
C-Scharbe8-Aug-06 21:31 
GeneralRe: key down in windows forms (C# 2.0) Pin
C-Scharbe8-Aug-06 21:39
C-Scharbe8-Aug-06 21:39 
QuestionClasses Pin
Mamphekgo27-Jul-06 3:50
Mamphekgo27-Jul-06 3:50 
AnswerRe: Classes Pin
Ennis Ray Lynch, Jr.27-Jul-06 4:08
Ennis Ray Lynch, Jr.27-Jul-06 4:08 
GeneralRe: Classes Pin
J4amieC27-Jul-06 5:16
J4amieC27-Jul-06 5:16 
GeneralRe: Classes Pin
Ennis Ray Lynch, Jr.27-Jul-06 5:29
Ennis Ray Lynch, Jr.27-Jul-06 5:29 
GeneralRe: Classes Pin
J4amieC27-Jul-06 5:59
J4amieC27-Jul-06 5:59 
GeneralRe: Classes Pin
Ennis Ray Lynch, Jr.27-Jul-06 6:11
Ennis Ray Lynch, Jr.27-Jul-06 6:11 
Questionhowto check datagridview's cell content ? help please ... Pin
cmpeng3427-Jul-06 2:51
cmpeng3427-Jul-06 2:51 
AnswerRe: howto check datagridview's cell content ? help please ... Pin
Mairaaj Khan27-Jul-06 3:23
professionalMairaaj Khan27-Jul-06 3:23 
AnswerRe: howto check datagridview's cell content ? help please ... Pin
Drew McGhie27-Jul-06 5:37
Drew McGhie27-Jul-06 5:37 
QuestionStartInfo.RedirectStandardOutput Pin
NewDev42427-Jul-06 2:31
NewDev42427-Jul-06 2:31 
AnswerRe: StartInfo.RedirectStandardOutput Pin
Ennis Ray Lynch, Jr.27-Jul-06 3:43
Ennis Ray Lynch, Jr.27-Jul-06 3:43 
QuestionRe: StartInfo.RedirectStandardOutput Pin
NewDev42427-Jul-06 17:19
NewDev42427-Jul-06 17:19 
QuestionInstaller Question Pin
JacquesDP27-Jul-06 2:26
JacquesDP27-Jul-06 2:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.