- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All,
I have a plugin .dll file written C# for .NetCore which works well.
Now I wanted to make a UI for it with Windows Forms.
Im struggling to add the reference for it.
Can someone please help me know where I am going wrong.
This is my project code.
------------------------------------------------
Code of a simple form
using System.Windows.Forms;
class SimpleForm : Form
{
public SimpleForm()
{
var label = new Label() { Text = "Name:", Location = new Point(10, 20) };
var textBox = new TextBox() { Location = new Point(60, 18), Width = 150 };
var button = new Button() { Text = "Greet", Location = new Point(60, 50) };
button.Click += (s, e) => MessageBox.Show($"Hello, {textBox.Text}!");
Controls.Add(label);
Controls.Add(textBox);
Controls.Add(button);
}
[STAThread]
static void Main()
{
Application.Run(new SimpleForm());
}
}
When I run my command method and try to show the form, no form appears.
Solved! Go to Solution.