如何在窗体应用程序中将标签显示为超链接? [英] How to show a label as a hyperlink in a window form application?

查看:100
本文介绍了如何在窗体应用程序中将标签显示为超链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在文本框中输入一个名称作为它下面的超链接。然后点击该超链接应该打开一个新窗口是否可以???



先谢谢...

Hi,,I want to display a name entered in a textbox as a hyperlink below it.and clicking on that hyperlink a new window should be opened can it be possible???

Thanks in advance...

推荐答案

LinkLabel links = new LinkLabel();

links.Text = textBoxName .Text;

links.Click + = new EventHandler(links_click);

links.Location = new Point(0,temp);

listBoxNames.Controls.Add(links);

temp + = 21;

textBoxName.Text =;



通过获取链接标签并动态创建它们....
LinkLabel links = new LinkLabel();
links.Text = textBoxName.Text;
links.Click += new EventHandler(links_click);
links.Location = new Point(0, temp);
listBoxNames.Controls.Add(links);
temp += 21;
textBoxName.Text = "";

By taking a link label and creating them dynamically....


这篇关于如何在窗体应用程序中将标签显示为超链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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