writing to mouse pointer position

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jefer
    New Member
    • Feb 2008
    • 6

    writing to mouse pointer position

    I would like to write a value on keydown (i'm going to use external triger) at mouse pointer position outside visual basic application (to a acces database cell or excel cell). ans suggestion how to do that? tnx
  • shuvo2k6
    New Member
    • Jan 2008
    • 68

    #2
    Originally posted by jefer
    I would like to write a value on keydown (i'm going to use external triger) at mouse pointer position outside visual basic application (to a acces database cell or excel cell). ans suggestion how to do that? tnx
    is it VB problem?

    "outside visual basic application "- what does it mean?
    Plz Clearly Mention.

    Comment

    • Killer42
      Recognized Expert Expert
      • Oct 2006
      • 8429

      #3
      Originally posted by jefer
      I would like to write a value on keydown (i'm going to use external triger) at mouse pointer position outside visual basic application (to a acces database cell or excel cell). ans suggestion how to do that? tnx
      Sounds mighty complex. To do so, you would have to (a) evaluate the mouse position on the display, (b) determine what (application) is visible at that point, (c) determine what the mouse is over in that other window, and (d) somehow interface to that application and tell it what to do.

      Of these, I'd say a is relatively simple, b is probably not too much tougher, d may range greatly in difficulty but will most likely have to be coded to work with specific applications, and c may be a real problem.

      There might be some way to short-circuit things by sending a mouse-click and keypress to Windows, but all I can say is, good luck!

      Comment

      • Ali Rizwan
        Banned
        Contributor
        • Aug 2007
        • 931

        #4
        Originally posted by jefer
        I would like to write a value on keydown (i'm going to use external triger) at mouse pointer position outside visual basic application (to a acces database cell or excel cell). ans suggestion how to do that? tnx
        I think he wants to get value from access cell or excel cell directly by clicking on it or by mouse hover.

        When he clicks or hover the mouse pointer on that particular cell the values passes to vb.

        For such i don't think this is simple.
        You need to declare API which returns the position of mouse pointer then you also need a big programming which detects on which application your mouse is over and detecting that is that a cell or not and then get value from that.

        I have made such application a month ago which detects the position of mouse and detects the program name on which that was.
        So i ll try to modify that for your needs and then send you.

        Regards
        >> ALI <<

        Comment

        • jefer
          New Member
          • Feb 2008
          • 6

          #5
          actually I have values comming from rs232 and external triger, but it can be something like
          ..when I press enter, the value from VB appears in excel/access cell

          Comment

          • vincey92
            New Member
            • Feb 2008
            • 11

            #6
            code for mouse position is:

            cursor.newpoint (500,500)

            this is vb2008 tho

            that is how to set the mouse position if u want to move a button to it i suppose it is:

            textbox1.locati on = then something else related to the other code

            i hope that made sense

            :D

            Comment

            Working...