Click here to Skip to main content
15,888,320 members
Home / Discussions / C#
   

C#

 
GeneralRe: question about delegates c# Pin
Richard MacCutchan5-Feb-11 21:26
mveRichard MacCutchan5-Feb-11 21:26 
GeneralRe: question about delegates c# Pin
OriginalGriff5-Feb-11 21:29
mveOriginalGriff5-Feb-11 21:29 
GeneralRe: question about delegates c# Pin
Gilbertu6-Feb-11 4:01
Gilbertu6-Feb-11 4:01 
GeneralRe: question about delegates c# Pin
OriginalGriff6-Feb-11 4:36
mveOriginalGriff6-Feb-11 4:36 
QuestionExtracting table from pdf in C# Pin
puneeth894-Feb-11 22:23
puneeth894-Feb-11 22:23 
AnswerRe: Extracting table from pdf in C# Pin
Henry Minute5-Feb-11 4:31
Henry Minute5-Feb-11 4:31 
AnswerRe: Extracting table from pdf in C# Pin
RaviRanjanKr6-Feb-11 23:37
professionalRaviRanjanKr6-Feb-11 23:37 
QuestionCaputre Unicode Keyboard Hook Pin
Anubhava Dimri4-Feb-11 18:14
Anubhava Dimri4-Feb-11 18:14 
Hello Experts,

I have a code of Keyboard Hook In which have a problem when i m tring to Capture Unicode Character then it's not working fine.
I know that i want to use MapVirtualKeyEx, ToUnicodeEx function to convert for Unicode.
But i am not unable to understand this function .

So Please can any one help me to convert it function for Unicode Support.




Private Function KeyboardProc(ByVal nCode As Integer, ByVal wParam As IntPtr, ByRef lParam As KeyboardData) As IntPtr
        If (nCode >= NativeMethods.HC_ACTION) Then
            Dim e As Pcdll.KeyBoardEventArgs
            Dim keyCode As Keys = CType(lParam.vkCode, Keys)

            Select Case True
                Case CInt(wParam) = NativeMethods.WM_KEYDOWN Or CInt(wParam) = NativeMethods.WM_SYSKEYDOWN
                    If keyCode = Keys.LMenu Or keyCode = Keys.RMenu Then
                        Me._keyData = Me._keyData Or Keys.Alt
                        e = New Pcdll.KeyBoardEventArgs(Me._keyData Or Keys.Menu, keyCode)
                    ElseIf keyCode = Keys.LControlKey Or keyCode = Keys.RControlKey Then
                        Me._keyData = Me._keyData Or Keys.Control
                        e = New Pcdll.KeyBoardEventArgs(Me._keyData Or Keys.ControlKey, keyCode)
                    ElseIf keyCode = Keys.LShiftKey Or keyCode = Keys.RShiftKey Then
                        Me._keyData = Me._keyData Or Keys.Shift
                        e = New Pcdll.KeyBoardEventArgs(Me._keyData Or Keys.ShiftKey, keyCode)
                    Else
                        e = New Pcdll.KeyBoardEventArgs(Me._keyData Or keyCode, keyCode)
                    End If
                    Me.OnKeyDown(e)
                    If e.Handled Then
                        Return CType(1, IntPtr)
                    End If
                Case CInt(wParam) = NativeMethods.WM_KEYUP Or CInt(wParam) = NativeMethods.WM_SYSKEYUP
                    If keyCode = Keys.LMenu Or keyCode = Keys.RMenu Then
                        Me._keyData = Me._keyData And Not (Keys.Alt)
                        e = New Pcdll.KeyBoardEventArgs(Me._keyData Or Keys.Menu, keyCode)
                    ElseIf keyCode = Keys.LControlKey Or keyCode = Keys.RControlKey Then
                        Me._keyData = Me._keyData And Not (Keys.Control)
                        e = New Pcdll.KeyBoardEventArgs(Me._keyData Or Keys.ControlKey, keyCode)
                    ElseIf keyCode = Keys.LShiftKey Or keyCode = Keys.RShiftKey Then
                        Me._keyData = Me._keyData And Not (Keys.Shift)
                        e = New Pcdll.KeyBoardEventArgs(Me._keyData Or Keys.ShiftKey, keyCode)
                    Else
                        e = New Pcdll.KeyBoardEventArgs(Me._keyData Or keyCode, keyCode)
                    End If
                    Me.OnKeyUp(e)
                    If e.Handled Then
                        Return CType(1, IntPtr)
                    End If
            End Select
        End If
        Return NativeMethods.CallNextHookEx(Me._hKeyboardHook, nCode, wParam, lParam)
    End Function




Reqired Link is here :

Global Windows Hooks[^]





Thanks
If you can think then I Can.

AnswerRe: Caputre Unicode Keyboard Hook Pin
Richard MacCutchan4-Feb-11 23:30
mveRichard MacCutchan4-Feb-11 23:30 
GeneralRe: Caputre Unicode Keyboard Hook Pin
Anubhava Dimri4-Feb-11 23:41
Anubhava Dimri4-Feb-11 23:41 
GeneralRe: Caputre Unicode Keyboard Hook Pin
Richard MacCutchan5-Feb-11 0:03
mveRichard MacCutchan5-Feb-11 0:03 
GeneralRe: Caputre Unicode Keyboard Hook Pin
OriginalGriff4-Feb-11 23:44
mveOriginalGriff4-Feb-11 23:44 
GeneralRe: Caputre Unicode Keyboard Hook Pin
Anubhava Dimri5-Feb-11 0:13
Anubhava Dimri5-Feb-11 0:13 
QuestionWhat is the easy and efficient way to collaborate with a remote Desktop application ? [modified] Pin
Nadia Monalisa4-Feb-11 17:40
Nadia Monalisa4-Feb-11 17:40 
AnswerRe: What is the easy and efficient way to collaborate with a remote Desktop application ? Pin
Anubhava Dimri4-Feb-11 21:19
Anubhava Dimri4-Feb-11 21:19 
GeneralRe: What is the easy and efficient way to collaborate with a remote Desktop application ? Pin
Nadia Monalisa4-Feb-11 21:45
Nadia Monalisa4-Feb-11 21:45 
QuestionDetermine If String Is Encrypted Pin
Kevin Marois4-Feb-11 11:33
professionalKevin Marois4-Feb-11 11:33 
AnswerRe: Determine If String Is Encrypted Pin
Eddy Vluggen4-Feb-11 12:10
professionalEddy Vluggen4-Feb-11 12:10 
GeneralRe: Determine If String Is Encrypted Pin
Kevin Marois4-Feb-11 12:28
professionalKevin Marois4-Feb-11 12:28 
GeneralRe: Determine If String Is Encrypted Pin
Richard Andrew x644-Feb-11 13:06
professionalRichard Andrew x644-Feb-11 13:06 
GeneralRe: Determine If String Is Encrypted Pin
Eddy Vluggen5-Feb-11 7:35
professionalEddy Vluggen5-Feb-11 7:35 
GeneralRe: Determine If String Is Encrypted Pin
OriginalGriff5-Feb-11 9:34
mveOriginalGriff5-Feb-11 9:34 
AnswerRe: Determine If String Is Encrypted Pin
Henry Minute4-Feb-11 13:09
Henry Minute4-Feb-11 13:09 
AnswerRe: Determine If String Is Encrypted Pin
PIEBALDconsult4-Feb-11 13:25
mvePIEBALDconsult4-Feb-11 13:25 
AnswerRe: Determine If String Is Encrypted Pin
jschell4-Feb-11 13:49
jschell4-Feb-11 13:49 

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.