我正在尝试执行以下操作:我将链接写入文本框并显示在链接标签中,然后单击链接标签,它会转到其中写入的 url?一切顺利,但按链接标签不会转到 url。
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click_1(object sender, EventArgs e)
{
label2.Text = textBox1.Text;
linkLabel1.Text = textBox2.Text;
}
private void Form1_FormClosed(object sender, FormClosedEventArgs e)
{
Properties.Settings.Default.checkbox = checkBox1.Checked;
Properties.Settings.Default.textbox = textBox1.Text;
Properties.Settings.Default.label = label2.Text;
Properties.Settings.Default.linkLabel = linkLabel1.Text;
Properties.Settings.Default.Save();
}
private void Form1_Load(object sender, EventArgs e)
{
checkBox1.Checked = Properties.Settings.Default.checkbox;
textBox1.Text = Properties.Settings.Default.textbox;
label2.Text = Properties.Settings.Default.label;
linkLabel1.Text = Properties.Settings.Default.linkLabel;
}
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
}