Results 1 to 6 of 6

Thread: Select Case Help

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2005
    Posts
    348

    Select Case Help

    i want to make a program that will record keystrokes from another app like notepad and it copy what is written in notepad to the other app. and then using an external text file send each word through it checking for all the ways to spells the words, and lets the user pick which one they want. but here is the first part and i would like for you'll to help with the rest. will this part work.
    VB Code:
    1. Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    2. Select Case KeyCode
    3. Case vbKeyA
    4. SendKeys "a"
    5. Case vbKeyB
    6. SendKeys "b"
    7. Case vbKeyC
    8. SendKeys "c"
    9. Case vbKeyD
    10. SendKeys "d"
    11. Case vbKeyE
    12. SendKeys "e"
    13. End Sub

  2. #2
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: Select Case Help

    this would save you some time:
    VB Code:
    1. Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    2.     SendKeys KeyCode
    3. End Sub
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2005
    Posts
    348

    Re: Select Case Help

    what does that do?

  4. #4
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Select Case Help

    xypherx,
    what you're after is called "key logger" and we don't support this arround here. Sorry.

    eyeRmonkey,
    besides some logic/syntax issues that was not what xypherx asked about.

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2005
    Posts
    348

    Re: Select Case Help

    sorry i didnt know. my apologies.

  6. #6
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Select Case Help

    No, you didn't have to apologize - I can feel that you don't have nothing bad in mind, it's not a problem.
    The real problem may come from someone that's looking for piece of code that could be used to create malicious app(s) ...

    Cheers.

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