apis

A

Anders Zuschlag

Hey
Can anyone figure out how this problem can be solved:
I want to use the "setcursorpos"-api (or anything else!) to put the cursor
on a specific control (cmdbuttom) on a form. The form is not maximized and
user can have placed it anywhere on the screen. I can ofcourse find out
which resolution the user is using on his pc, but will that solve my
problem? The getcursorpos returns the cursor position in pixels, and the
setcursorpos uses also these pixels - ex. 1024x768. In access, when i fex.
uses msgbox mycmdbutton.left, I am not getting result in pixels but in ?
something about 15 times the 1024.
Please help.
 
G

Gary Miller

Anders,

Unless I totally misunderstand you, it is really very simple
using the SetFocus method...

Me!YourCommandButtonName.SetFocus

It doesn't care where the control physically is on the
screen.

--

Gary Miller
Gary Miller Computer Services
Sisters, OR
________________________
 
T

TC

I saw a non-Access applicatiuon the other day, where, when it displayed a
dialog box, it automatically moved the physical (arrow) cursor onto the OK
button! Freaky.

TC
 
T

TC

Rick Brandt said:
Actually my mouse driver has that as an option for all dialogs.


Ok! I'd never seen that before. I assumed it must have been the application.
I guess a mouse driver could hook the relevant APIs, to determine when >any<
application had displayed a messagebox.

TC
 
R

Rick Brandt

TC said:
I saw a non-Access applicatiuon the other day, where, when it displayed a
dialog box, it automatically moved the physical (arrow) cursor onto the OK
button! Freaky.

TC

Actually my mouse driver has that as an option for all dialogs.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top