S
Sean Connolly
Hello,
Is there anyone out there that can maybe help me with some code or the name
of the Win32 API function to obtain the window handle of an MSForms UserForm
and/or control 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.
What I can successfully do in Access is write code for the MouseUp event of
an Access Form control to call the HTMLHelp API function and pass the
relevant parameters required. I intercept the right mouse button click and
'presto' my text popups appear perfectly. The kicker is that this relies on
passing the built-in .hWnd property of Access Forms to the HTMLHelp API
function. (I also make use of the GetDlgCtrlID API function to pass the
relevant Access Form control's identifier and context-sensitive help text to
the HTMLHelp API function call).
Excel MSForms don't seem to have the same built-in .hWnd property available,
so I'm thinking that I need to make a call to another Win32 API function in
order to return the window handle of my MSForms UserForm in Excel. I've spent
the best part of a week searching and trying different functions and methods
to obtain and return a) the window handle of an MSForms UserForm and
subsequently by using GetDlgCtrlID; b) the UserForm control's identifier.
Is this even possible? Does anyone out there know how. Extremely grateful
for any tips, assistance or suggestions that anyone can provide. 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 code or the name
of the Win32 API function to obtain the window handle of an MSForms UserForm
and/or control 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.
What I can successfully do in Access is write code for the MouseUp event of
an Access Form control to call the HTMLHelp API function and pass the
relevant parameters required. I intercept the right mouse button click and
'presto' my text popups appear perfectly. The kicker is that this relies on
passing the built-in .hWnd property of Access Forms to the HTMLHelp API
function. (I also make use of the GetDlgCtrlID API function to pass the
relevant Access Form control's identifier and context-sensitive help text to
the HTMLHelp API function call).
Excel MSForms don't seem to have the same built-in .hWnd property available,
so I'm thinking that I need to make a call to another Win32 API function in
order to return the window handle of my MSForms UserForm in Excel. I've spent
the best part of a week searching and trying different functions and methods
to obtain and return a) the window handle of an MSForms UserForm and
subsequently by using GetDlgCtrlID; b) the UserForm control's identifier.
Is this even possible? Does anyone out there know how. Extremely grateful
for any tips, assistance or suggestions that anyone can provide. Let me know
if more info is needed from me.
Thanks and Regards, Sean.