Winform消息框中的可单击URL? [英] Clickable URL in a Winform Message Box?

查看:67
本文介绍了Winform消息框中的可单击URL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在消息框中显示一个帮助链接.默认情况下,文本显示为不可选择的字符串.

I want to display a link to help in a message box. By default the text is displayed as a non-selectable string.

推荐答案

一个选项是在消息框中显示URL,并显示一条消息,并提供帮助您转到该URL的帮助按钮:

One option is display the url in the message box, along with a message and provide the help button that takes you to that url:

MessageBox.Show(
    "test message",
    "caption",
    MessageBoxButtons.YesNo,
    MessageBoxIcon.Information,
    MessageBoxDefaultButton.Button1,
    0, '0 is default otherwise use MessageBoxOptions Enum
    "http://google.com",
    "keyword")

重要的是,此代码不能出现在表单的加载事件中,帮助"按钮将不会打开链接.

Important to note this code cannot be in the load event of the form, the Help button will not open the link.

这篇关于Winform消息框中的可单击URL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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