private void iCPToolStripMenuItem_Click(object sender, EventArgs e) { string name = Microsoft.VisualBasic.Interaction.InputBox("Enter name with command.", "File Name", ""); td2 = new Thread(() => ica.executeICA(name)); td2.Start(); //use time bare here }