Question Combining Windows Forms With Console Application

alexmicheal49

New member
Joined
Nov 26, 2018
Messages
1
Programming Experience
Beginner
So, I'm working on this little project to try to learn more about networking and also C# as I go along.
What I'm attempting to achieve is where you click on a button and it opens a Console window that allows for user input and essentially I want to be able to have a user enter an IP address and a port and be able to connect to a computer that is running the Server application (TcpListener).
I have everything working, but not in a windows form. I was using just a standalone console application. Is there any way that I can implement a console application into a windows form?
 
Why would you need to "implement a console application into a windows form"? It's all C# code. Why can't you just create a WinForms app and have the user enter the required data in a TextBox? You can start a Console app from a WinForms app by calling Process.Start but they are two separate apps, so they are not sharing data. There are ways to communicate between them but there's nothing specific in what you've posted that indicates that you would need two separate apps in the first place.
 
Back
Top Bottom