S
Sean Connolly
Hello,
Is there anyone out there that can maybe help me with some tips or code to
call from VBA in order to obtain the control identifiers and handles for
controls on an MSForms UserForm? (I know that the MSForms UserForm class name
is "ThunderDFrame" and can obtain its window handle, but I'm stuck getting
any further information about the controls on that form).
Let me explain a bit further. I've created a large model/application
(xl2003, WinXP Pro) - works peachy. I've also created a compiled help file
with HTMLHelp (*.chm) - again, no problems. Declaring and then calling the
HTMLHelp API in hhctrl.ocx successfully links the compiled help topics to the
Excel application.
All great so far, but I have also created context-sensitive popup text help
which used to work great in the 'good old days' of WinHelp (*.hlp) and Help
Workshop via the "What's This" button. Things are different now.
I have written code for the MouseUp event of certain controls on the MSForms
UserForm to call the HTMLHelp API function. However, in order to correctly
display the help popup, I need to pass the relevant control's identifier and
handle to the HTMLHelp API function call.
So what I need to do (if it is even possible, or unless there is another way
that you or one of the other gurus here can advise) is obtain the window
handle of each control on the MSForms UserForm that I want to add
context-sensitive help to so that I can pass that to the GetDlgCtrlID Win32
API function and obtain the control identifier to pass to HtmlHelp. (Phew!).
Do MSForms userform controls (ListBox, CommandButton etc.) also have class
names (as for "ThunderDFrame")?
I'm continuing to search and poke around, but any further tips, assistance
or suggestions that anyone here can provide *very* gratefully received. Let
me know if more info is needed from me.
Thanks and Regards, Sean.
Is there anyone out there that can maybe help me with some tips or code to
call from VBA in order to obtain the control identifiers and handles for
controls on an MSForms UserForm? (I know that the MSForms UserForm class name
is "ThunderDFrame" and can obtain its window handle, but I'm stuck getting
any further information about the controls on that form).
Let me explain a bit further. I've created a large model/application
(xl2003, WinXP Pro) - works peachy. I've also created a compiled help file
with HTMLHelp (*.chm) - again, no problems. Declaring and then calling the
HTMLHelp API in hhctrl.ocx successfully links the compiled help topics to the
Excel application.
All great so far, but I have also created context-sensitive popup text help
which used to work great in the 'good old days' of WinHelp (*.hlp) and Help
Workshop via the "What's This" button. Things are different now.
I have written code for the MouseUp event of certain controls on the MSForms
UserForm to call the HTMLHelp API function. However, in order to correctly
display the help popup, I need to pass the relevant control's identifier and
handle to the HTMLHelp API function call.
So what I need to do (if it is even possible, or unless there is another way
that you or one of the other gurus here can advise) is obtain the window
handle of each control on the MSForms UserForm that I want to add
context-sensitive help to so that I can pass that to the GetDlgCtrlID Win32
API function and obtain the control identifier to pass to HtmlHelp. (Phew!).
Do MSForms userform controls (ListBox, CommandButton etc.) also have class
names (as for "ThunderDFrame")?
I'm continuing to search and poke around, but any further tips, assistance
or suggestions that anyone here can provide *very* gratefully received. Let
me know if more info is needed from me.
Thanks and Regards, Sean.