"What's This" type button

B

brett

I nearly have all my ducks in a row with a project I have been working
on. Now down to the final dash and have completed all the necessary
help files. All I need now is a way to simulate the "what's this"
button on a form.

My problem is that I am using a form with no border so the standard
"what's this" button cannot show.

Can anyone offer a solution to create a similar standard type button
on the forms body please?

Regards Brett
 
D

Dale Fye

You could create a custom shortcut menu. So that if the user right clicks on
a control they would see a popup menu that includes a "What's this option".
I do this all the time with my controls. Each type of control has different
options such as Find, Spell check, Cut, Copy, Paste, and What's this.

--
HTH
Dale

email address is invalid
Please reply to newsgroup only.
 
B

brett

You could create a custom shortcut menu.  So that if the user right clicks on
a control they would see a popup menu that includes a "What's this option".  
I do this all the time with my controls.  Each type of control has different
options such as Find, Spell check, Cut, Copy, Paste, and What's this.

--
HTH
Dale

email address is invalid
Please reply to newsgroup only.








- Show quoted text -

Thanks Dale,

Can you give me an example of what you do please. I looked at doing
this myself initially however there is not a "what's this" option in
the command list under customization.

Regards Brett
 
D

Dale Fye

I generally create a table (tbl_Help) that contains fields (formName,
ctrlName, ctrlDesc). I have some code that loops through all of the forms,
and all of the controls (not labels) to enter them in tbl_Help. Then I go
through and fill in the description field for those I want to include in my
What's This or (Control Help) shortcut item.

The code for the shortcut menus is pretty simple, but I generally just copy
and paste, so I cannot recall it well enough to put it in this message. I'm
away from home, and don't have my computer with me. Will be home on Sunday,
so will try to send you some sample code then.

--
HTH
Dale

email address is invalid
Please reply to newsgroup only.
 
B

brett

I generally create a table (tbl_Help) that contains fields (formName,
ctrlName, ctrlDesc).  I have some code that loops through all of the forms,
and all of the controls (not labels) to enter them in tbl_Help.  Then Igo
through and fill in the description field for those I want to include in my
What's This or (Control Help) shortcut item.

The code for the shortcut menus is pretty simple, but I generally just copy
and paste, so I cannot recall it well enough to put it in this message.  I'm
away from home, and don't have my computer with me.  Will be home on Sunday,
so will try to send you some sample code then.

--
HTH
Dale

email address is invalid
Please reply to newsgroup only.








- Show quoted text -

Thanks for your input Dale.

I have worked out how to do it now however this option ceases to
function for a disabled field... and I still need to tell the user
what it is so...

Original question still stands.

Can anyone offer a way to access the API that is used by the genuine
"What's This" button?

Regards Brett.
 
B

brett

Thanks for your input Dale.

I have worked out how to do it now however this option ceases to
function for a disabled field... and I still need to tell the user
what it is so...

Original question still stands.

Can anyone offer a way to access the API that is used by the genuine
"What's This" button?

Regards Brett.- Hide quoted text -

- Show quoted text -

After much searching I came up with a variant of a VB NET proceedure.
Trouble is, it doesn't work as expected.

I have a new module with the following code in it...

Private Declare Function PostMessage Lib "user32" Alias "PostMessageA"
_
(ByVal hWnd As Integer, _
ByVal wMsg As Integer, _
ByVal wParam As Integer, _
ByVal lParam As Integer) _
As Integer

Private Declare Function GetActiveWindow Lib "user32" () As Integer

Private Const WM_SYSCOMMAND = &H112
Private Const SC_CONTEXTHELP = &HF180

Public Sub WhatsThisMode()
If Not PostMessage(GetActiveWindow(), WM_SYSCOMMAND,
SC_CONTEXTHELP, 0) Then
MsgBox "This is not good!"
End If
End Sub

It is attached to a button on a form. Apparently it should make the
cursor behave the same way as clicking the "What's This" button. It is
close but not quite right. Can anyone expand on it please?

Regards Brett
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top