如何使用标题栏帮助按钮? [英] How to use Caption Bars HELP button?

查看:149
本文介绍了如何使用标题栏帮助按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,所以我已经在程序的标题栏中添加了帮助按钮",但是我不确定如何使用它.一旦按下按钮,它会将光标更改为一个小问号,然后用户应该单击一个按钮,它将显示一些帮助文本或其他内容.但是我的问题是此帮助按钮"的代码是什么?
我尝试使用下面的代码,当按下帮助按钮然后用户单击某些内容时,它将显示该文本框,但是我需要为使用该帮助按钮的每个按钮处理不同的帮助文本.

Alright, so I have added the "Help button" to the caption bar of my program, but I am unsure how to use it. Once the button is pressed it changes the cursor to a little question mark and then the user is supposed to click a button and it will display some help text or something. But my question is what is the code for this "Help Button"?
I tried using the below code and it displays that textbox when the help button is pressed and then the user clicks something, but I need to handle different help texts for each button that the help button is used on.

Private Sub Form1_Help(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.HelpRequested
    MsgBox("hi")
End Sub


谢谢! :)


Thanks! :)

推荐答案

尝试使用

我添加了另一个答案,因为我觉得这是一个不同的问题.

无论如何,也许最简单的方法是使用工具提示.例如,在您的HelpRequested 事件中尝试以下操作:
I added another answer since I felt this is a different question.

Anyway, perhaps the easiest way is to use tooltip. For example try the following in your HelpRequested event:
Dim toolTip1 As New ToolTip()

toolTip1.Show("Some text goes here", Me.Button1, 1000)



有关工具提示的更多信息:
气球提示嘉豪! [ ^ ]同时具有c#和vb实现.不知道它在较新的环境中如何工作,但值得一试.



More info on ToolTip:ToolTip Class[^]

There are also plenty of great articles at CodeProject for different kinds of balloons etc. For example this one Balloon Tips Galore![^] has both c# and vb implementations. Don''t know how it works with newer environments but it may be worth a try.


这篇关于如何使用标题栏帮助按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆