3
Answers

creating a new form instance with Application.Run

Photo of dmosborne

dmosborne

20y
2.2k
1
I'm wondering why the following line of code is valid: Application.Run(new MyForm()); (Assuming the class MyForm exists) Does this result in the creation of a new instance of the MyForm class? If so, why don't you have to give the instance a name? I would expect you would have to do the following: private MyForm MyFormInstance; then, later... Application.Run(MyFormInstance = new MyForm()); Thanks. Diluter

Answers (3)

0
Photo of Vijay Yadav
NA 1.7k 538k 14y
Hi Minh,
try this SendKeys.Send("{Right}");
Hope this will work!!!