.NET C# main method and windows forms -
i have visual studio project uses c# , console application. when try run/build/debug project look's main method in existing class. have added windows form on project , want run in windows form version , not in command line (expecting arguments). can tell me how edit run time of project windows forms instead of static void main()?
method 1
in main function use following:
application.run(new form1()); you need add following line @ top of file:
using system.windows.forms;
method 2
in main function, add this:
form1 c = new form1(); c.showdialog(); both methods show form dialog. console still visible in background however.
if want hide console window following link gives instructions (but it's little convoluted):
Comments
Post a Comment