Visual Basic 6 & Access 2000


Closed Thread
Results 1 to 34 of 34

Hybrid View

  1. #1
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,159


    Did you find this post helpful? Yes | No

    Default

    Luciano, The whole reason for this application is to send keystrokes to an application.

    Keith, That's how the Help file does it, I had shrunk it down a bit for testing.


    I was hoping there was a sort of 'list' feature of running applications that I could scroll through; something like ALT-TAB. But now that I think more about it, similar applications make the user select the executable (like the Profiler for the Logitech wheel). By forcing focus on a selected executable, I reduce that danger that Luciano brought up.

    Robert
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,159


    Did you find this post helpful? Yes | No

    Default

    I ended up storing the executable, at least it works.


    Any idea why this is seen by a game:

    SendKeys "{F3}", False

    But this is not:

    SendKeys "{LEFT}", False


    The Help file lists the Left Arrow as a special character just like F3, but it doesn't work for some reason.

    Robert
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  3. #3
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi,

    Games use DirectInput. (DirectX).

    Best regards,

    Luciano

  4. #4
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,159


    Did you find this post helpful? Yes | No

    Default

    Yes, but games also use keyboard input.

    I found several good tutorial links on a gaming site:
    http://www.vbtutor.net/vbtutor.html
    http://cuinl.tripod.com/tutorials.htm
    http://www.vbcode.com/
    http://www.planet-source-code.com/

    Not sure if they were mentionned above.

    One guy in those tutorials recommended using the SendInput feature instead of the "basically broken" SendKeys.

    Robert
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  5. #5
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,159


    Did you find this post helpful? Yes | No

    Default

    I'm starting to see what people have moaned about MS products. Most of the links I've read relating with SendKeys says that it is not reliable, if it works at all.

    This place describes using a more flexible keyboard API:
    http://www.vbaccelerator.com/home/VB...PI/article.asp

    Still reading, how it's understandable.

    Robert
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  6. #6
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi,

    Normal windows programs

    When a key is pressed, the keyboard driver passes the keystroke
    to Windows and the message is saved in the system message queue.
    Windows then transfers the message from the system queue to the
    queue of the program with the "input focus" where the keystroke
    is then processed.

    * * *

    Games using DirecX

    DirectInput (see DirectX) works directly with the keyboard driver.
    So when you play, the game does not get keystrokes as a normal
    Windows message.

    * * *

    Be aware that posts in forums can be very old. (Not about VB6 SP6).
    Also most of these post are written by people like me and you.

    Best regards,

    Luciano

  7. #7
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,159


    Did you find this post helpful? Yes | No

    Default

    I'm still not sure how DirectInput games will come into play with my machine. I guess I'll have to cross that bridge when I fall in the water. I suppose I can learn about DirectInput later and add in code to deal with those games at that point. I'll add a flag right away in my database; Input Type (DirectInput or Keyboard Input).

    I tried that guy's demo, pasted the Class Module directly in my project, I called his version of SendKeys with "{LEFT}" and the Left Arrow worked like a charm in my game.

    WOOHOO! I'm back on track.

    Robert
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

Similar Threads

  1. Replies: 5
    Last Post: - 24th August 2006, 21:59
  2. Visual Basic 6 question
    By Christopher4187 in forum Off Topic
    Replies: 5
    Last Post: - 3rd July 2006, 13:06
  3. Visual Basic 6 and Pic com
    By shawn in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 15th September 2005, 05:21
  4. Output PIC module
    By freelancebee in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th September 2005, 20:10
  5. '877 and Visual Basic 6
    By Tomas in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 4th March 2004, 02:31

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

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