Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default focusing mouse pointer to the specific button in a userform



userform1.show
After the following code ,and then I want to be focused with mouse
pointer to the specific button(for example, commandbutton1)
automatically.

Maybe, it would seem be used win32Api.

*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default focusing mouse pointer to the specific button in a userform

Look at the GetCursorPos and SetCursorPos API's.

RBS


"tom taol" wrote in message
...


userform1.show
After the following code ,and then I want to be focused with mouse
pointer to the specific button(for example, commandbutton1)
automatically.

Maybe, it would seem be used win32Api.

*** Sent via Developersdex http://www.developersdex.com ***


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default focusing mouse pointer to the specific button in a userform

thanks, but i want to how to know the handle of the commandbutton1 on a
userform1.



*** Sent via Developersdex http://www.developersdex.com ***
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default focusing mouse pointer to the specific button in a userform

I don't think command buttons on Userforms have window handles.
You will have to work out the position of the button and move the cursor
accordingly.

RBS


"tom taol" wrote in message
...
thanks, but i want to how to know the handle of the commandbutton1 on a
userform1.



*** Sent via Developersdex http://www.developersdex.com ***


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
No userform, runs from module, want to change mouse pointer musa.biralo Excel Programming 2 March 13th 07 12:33 PM
Userform and mouse pointer Shawn Excel Programming 3 August 16th 06 09:42 PM
move mouse pointer to a default button(Enter) in messagebox x taol Excel Programming 1 March 31st 06 01:17 PM
mouse pointer . . . again! lightbulb_bill[_2_] Excel Programming 1 August 15th 05 11:48 PM


All times are GMT +1. The time now is 09:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"