MISSING: TabControl MouseDown, KeyDown/KUp Events |
Post Reply |
Author | ||
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1354 |
Post Options
Thanks(0)
Posted: 18 July 2008 at 12:12am |
|
Control has MouseMove and MouseUp, but not MouseDown. Has neither KeyUp or KeyDown events.
I would like to be able to determine if the user has switched tabs via keyboard or mouse so that I can choose whether to automatically focus a child control (mouse interaction) or not (keyboard interaction). These events would allow me to accomplish this. |
||
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
||
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1354 |
Post Options
Thanks(0)
|
|
I've found a work-around to accomplish the above goal (in case anyone else has a similar requirement).
In a module place this code:
Then, on your form with the TabControl:
Essentially, we are checking to see if either of the cursor keys are being pressed when the TabControl is about to change the selected tab. If so, then the focus will remain on the TabControl (so the user can continue navigating the tabs with the keyboard). If not, we'll assume that the user clicked a tab with the mouse, and then move the focus to some other control where they presumably want to start typing directly. |
||
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
||
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |