0

I converted my console application to windows forms application. Now if I need to run this program in both forms and console what do i do? I tried running it as WinForms and console... in both the cases only one of them are opened. Any advice?

1
  • What about having a command line argument that sends output to the console rather than showing the UI? You would need to separate your code such that it can work without the UI (Which I assume you have already done). Fr a more detailed answer you need to provide more detail. Commented Jul 30, 2014 at 10:20

2 Answers 2

1

You have got two very different outputs which want to share the same code base for logic.

You will need to separate your application logic into a code library, then reference it from a Windows App and a Console App. In each app call the appropriate methods to perform whatever functionality you want.

Sign up to request clarification or add additional context in comments.

1 Comment

This helped ! Thank you ! can you give me some link where i can learn how to separate my code to libraries ?
0

You can start project in Console application and add windows forms in it. I tried in my projects. :)

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.