I mean that Visual C# can make a windows form app easily, but i want to know how C# can make WFA (because Visual C# just is a ide). how a Windows Application(not Console) can run in windows.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well, you write exactly the same code as normal, but compile with:
Of course if you’ve written everything in Visual Studio, you’ll have designer files – but you can write everything manually. Here’s a small WinForms Hello World app:
Having mentioned the target switch earlier, I should point out that you don’t have to use it – you can compile and run the code above using just
I sometimes find that handy if I want to write a small test app which sends diagnostics to the console. It will start as a console app but still displays the form perfectly well.