The form does not have any idea of the existence of the program class.
So, you have to get the argument in the program class, and pass it along to the form when you create it:
class Program
{
void Main(string[] args) {
Application.Run(new WinForm(args[0]));
}
}
Of course, this supposes that you also give the
WinForm
class (or whatever you called it) the corresponding constructor:
class WinForm : Form
{
public WinForm(string arg) {
}
}
Hope this helps. Kindly.