I want to set image as hyperlink in windows form at design time. May I know which class should I use, and property I need to set to enable this requirement?
if you want to open an other window (eg Form2
) you can write your code in Click
event:
private void PictureBox1_Click(object sender, EventArgs e)
{
Form2 frm = new Form2();
frm.Show();
}
And if you want to open a folder in windows explorer, you should do it like so:
private void PictureBox1_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("explorer.exe", @"d:\");
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.