Jef*_*eff 23 vb.net url messagebox winforms clickable
我想在消息框中显示帮助链接.默认情况下,文本显示为不可选字符串.
sch*_*har 39
一个选项是在消息框中显示URL以及消息,并提供将您带到该URL的帮助按钮:
MessageBox.Show(
"test message",
"caption",
MessageBoxButtons.YesNo,
MessageBoxIcon.Information,
MessageBoxDefaultButton.Button1,
0, '0 is default otherwise use MessageBoxOptions Enum
"http://google.com",
"keyword")
Run Code Online (Sandbox Code Playgroud)
重要的是要注意这段代码不能在表单的load事件中,Help按钮不会打开链接.
MessageBox不会这样做.您需要使用TaskDialog(在Vista中引入)或创建自己的对话框.
- 编辑 -
有办法伪造XP上的任务对话框.CodeProject.com上有一些文章,我过去曾经使用过.