The code I have so far is:
private void MyThreadRoutine()
{
this.Invoke(this.showProgressGifDelegate);
ModifyConnectString.main();
this.Invoke(this.HideProgressGifDelegate);
}
public void showProgressGifDelegate() { pictureBox2.Visible = true; }
public void HideProgressGifDelegate() { pictureBox2.Visible = false; }
From what I can tell this should work but non the less it does not compile because I get the error
'Argument 1: cannot convert from 'method group' to 'System.Delegate'' and 'The best overloaded method match for 'System.Windows.Forms.Control.Invoke(System.Delegate, params object[])' has some invalid arguments'
Any ideas on the correct syntax for my code?