apis

  • Thread starter Thread starter Anders Zuschlag
  • Start date Start date
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.
 
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
________________________
 
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
 
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
 
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.
 
Back
Top