By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,203 Members | 1,383 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,203 IT Pros & Developers. It's quick & easy.

writing to mouse pointer position

P: 6
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
Feb 5 '08 #1
Share this Question
Share on Google+
5 Replies


P: 68
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.
Feb 5 '08 #2

Expert 5K+
P: 8,434
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!
Feb 6 '08 #3

Ali Rizwan
100+
P: 927
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 <<
Feb 6 '08 #4

P: 6
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
Feb 7 '08 #5

vincey92
P: 11
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.location = then something else related to the other code

i hope that made sense

:D
Feb 9 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.