I recently started to work with dynamic components, and it worked fine until I started with dynamic linked label. So here's my Problem: I want to open a website through a label link but every time I try to do that, it happens to break the program and give me the error: System.ComponentModel.Win32Exception.
private void CreateDynamicLinkedLabel() { LinkLabel mylinklab = new LinkLabel(); mylinklab.Text = "asdasdasda"; mylinklab.AutoSize = true; mylinklab.LinkClicked += new LinkLabelLinkClickedEventHandler(mylinklab_Clicked); Controls.Add(mylinklab); } private void mylinklab_Clicked(object sender, LinkLabelLinkClickedEventArgs e) { Process.Start("http://www.google.com"); } I also tried this:
private void mylinklab_Clicked(object sender, LinkLabelLinkClickedEventArgs e) { Process.Start("chrome.exe","http://www.google.com"); } i even included using System.Diagnostics; I tried to figure out why it wont work, but every Youtube Video looks like my code. Maybe there is another way to open a link, but i cant figure it out.