'Opening and writing to form from console aplication [closed]
My goal is to add a existing project of a windows form with a textbox to a console project in Visual Studio. And by running the console program the form is opened and objects on the form such as a textbox can be written to in the console program.
I am having a issue of simply opening the form from the console application:
using GUI_VISUIALZATION;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
class program
{
static void Main(string[]args)
{
GUI gUI = new GUI();
gUI.Show();
Console.ReadKey();
}
}
Name of program with form in it: GUI VISUIALZATION
Name of form: GUI
Namespace of form: GUI_VISUIALZATION
Name of console project: ACTIVATE
Solution Explorer:

When console program is run

Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
