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

查看:18
本文介绍了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")

需要注意的是这段代码不能在表单的load事件中,Help按钮不会打开链接.

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天全站免登陆