[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.excel.programming

Re: Window Class of UserForm controls

Peter T

12/15/2006 9:32:00 AM

You have definitive answers concerning hWnd of the active control but even
were you to obtain that I don't see how it would help with your context
sensitive help.

There is a built in method as Nick mentioned but you can simulate your own
with something like

Private Sub CommandButton1_KeyDown(ByVal KeyCode As _
MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = vbKeyF1 Then
Call myHelp(CommandButton1.HelpContextID)
End If

End Sub

myHelp being a routine to call the help API if using html help

could do something similar with mousemove if your chm provides popups

There is also ' ActiveControl ' if needs.

Regards,
Peter T


"Martin" <Martin@discussions.microsoft.com> wrote in message
news:8312ABD6-70E9-4125-868D-DDD9636214B2@microsoft.com...
> Can anyone tell me the API Window Class of controls in a userform? Or,
even
> better, point me to a definitive list of the window classes in MS Office?
>
> I'm trying to find a way to to identify the hWnd of the active control
(not
> easy in VBA) so I can use context sensitive help.