Hello! I tray to make an GUI for my bot. Now i came to the Point where the bot should write from an Thread into an listbox. Iam using the Visuall Studios 2008 version vor Developing. How can i do it?
Hello! I tray to make an GUI for my bot. Now i came to the Point where the bot should write from an Thread into an listbox. Iam using the Visuall Studios 2008 version vor Developing. How can i do it?
Assuming you are keeping everything in the same project, and not communicating between assemblies
Code:public delegate void AddToListBoxDel(string msg); private void ListBoxAdd(string msg) { if (listBox1.InvokeRequired) { this.Invoke(new AddToListBoxDel(ListBoxAdd), msg); } else { listBox1.Add(msg); } }