Results 1 to 12 of 12

Thread: changing letter outupt!????

  1. #1

    Thread Starter
    Hyperactive Member Cmdr0Sunburn's Avatar
    Join Date
    May 2001
    Location
    g0t r00t?
    Posts
    461

    Question changing letter outupt!????

    ok i want to change the letter that comes out when i press a key any where in my computer.,
    lets say i am typing here at vb world, and i type a letter "o", and i want a "0" zero to come out, can this be done????
    I know a lot oF Vb, expert in C++, and i think in assembly.
    MSVC++6.NET
    vb6
    masm
    Windowz Xp
    I find my self using this a lot in C++

    __asm {
    }

  2. #2

    Thread Starter
    Hyperactive Member Cmdr0Sunburn's Avatar
    Join Date
    May 2001
    Location
    g0t r00t?
    Posts
    461
    bump
    I know a lot oF Vb, expert in C++, and i think in assembly.
    MSVC++6.NET
    vb6
    masm
    Windowz Xp
    I find my self using this a lot in C++

    __asm {
    }

  3. #3
    Frenzied Member macai's Avatar
    Join Date
    Jul 2001
    Location
    Napanoch NY
    Posts
    1,228

    Talking Hmm...

    VB Code:
    1. Private Sub Text1_KeyPress(KeyAscii As Integer)
    2.  Select Case KeyAscii
    3.   Case Asc("o")
    4.    KeyAscii = Asc("0")
    5.  End Select
    6. End Sub
    Does this help?
    Luke

  4. #4

    Thread Starter
    Hyperactive Member Cmdr0Sunburn's Avatar
    Join Date
    May 2001
    Location
    g0t r00t?
    Posts
    461
    no, because i am not typing IN my program, i am typing out of it
    I know a lot oF Vb, expert in C++, and i think in assembly.
    MSVC++6.NET
    vb6
    masm
    Windowz Xp
    I find my self using this a lot in C++

    __asm {
    }

  5. #5
    PowerPoster BruceG's Avatar
    Join Date
    May 2000
    Location
    New Jersey (USA)
    Posts
    2,657
    If macai's suggestion is not what you're after, then I assume you want to re-map your keyboard keys. You could probably write a program to do this using API's - haven't done it before though. I would start looking at the API's that deal with the keyboard.
    "It's cold gin time again ..."

    Check out my website here.

  6. #6

    Thread Starter
    Hyperactive Member Cmdr0Sunburn's Avatar
    Join Date
    May 2001
    Location
    g0t r00t?
    Posts
    461
    Originally posted by BruceG
    If macai's suggestion is not what you're after, then I assume you want to re-map your keyboard keys. You could probably write a program to do this using API's - haven't done it before though. I would start looking at the API's that deal with the keyboard.
    this is what i orignally asked for.
    I know a lot oF Vb, expert in C++, and i think in assembly.
    MSVC++6.NET
    vb6
    masm
    Windowz Xp
    I find my self using this a lot in C++

    __asm {
    }

  7. #7
    Frenzied Member macai's Avatar
    Join Date
    Jul 2001
    Location
    Napanoch NY
    Posts
    1,228

    Red face ohh

    Oh i see. Well, you see you can use the "GetAsyncKeyState" API
    and when the user presses certain buttons, you say
    VB Code:
    1. 'Declares
    2. Public Declare Function GetAsyncKeyState Lib "user32" Alias "GetAsyncKeyState" (ByVal vKey As Long) As Integer
    3. 'When you want to replace o with 0
    4. SendKeys {BS}
    5. SendKeys "0"
    6. 'Check for the button being pressed
    7. If GetAsyncKeyState(Asc("o"))
    Does THAT help?
    Luke

  8. #8
    Frenzied Member macai's Avatar
    Join Date
    Jul 2001
    Location
    Napanoch NY
    Posts
    1,228

    Thumbs down woops

    VB Code:
    1. 'Declares
    2. Public Declare Function GetAsyncKeyState Lib "user32" Alias "GetAsyncKeyState" (ByVal vKey As Long) As Integer
    3. 'When you want to replace o with 0
    4. SendKeys vbKeyBack
    5. SendKeys "0"
    6. 'Check for the button being pressed
    7. If GetAsyncKeyState(Asc("o")) Then
    Sorry i found a couple errors, try this.
    Luke

  9. #9

    Thread Starter
    Hyperactive Member Cmdr0Sunburn's Avatar
    Join Date
    May 2001
    Location
    g0t r00t?
    Posts
    461
    doesnt sendkeys need a window name to send to?
    then i wound need to find what window i am typing in
    I know a lot oF Vb, expert in C++, and i think in assembly.
    MSVC++6.NET
    vb6
    masm
    Windowz Xp
    I find my self using this a lot in C++

    __asm {
    }

  10. #10
    Frenzied Member macai's Avatar
    Join Date
    Jul 2001
    Location
    Napanoch NY
    Posts
    1,228

    Talking Nope

    SendKeys, by default, sends the keys to whatever is the currently
    active control. Cool, huh?
    Luke

  11. #11
    Addicted Member goudabuddha's Avatar
    Join Date
    Jun 2001
    Location
    Somewhere cheesy
    Posts
    203
    If you want to remap your keys just pop them off of your keyboard and move them around

  12. #12
    Frenzied Member macai's Avatar
    Join Date
    Jul 2001
    Location
    Napanoch NY
    Posts
    1,228
    Originally posted by goudabuddha
    If you want to remap your keys just pop them off of your keyboard and move them around
    Idiot! Just Kidding
    Luke

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width