What's the error message you get?
I changed to
Code:
using System;
using System.ComponentModel;
using System.Windows.Forms;
using System.IO;
using System.Drawing;
using OpenQuant.API;
using OpenQuant.API.Indicators;
public class MyScript : Script{
public override void Run() {
Form1 test = new Form1();
}
}
public class Form1 : Form
{
public Button button1;
public Form1() {
button1 = new Button();
button1.Size = new Size(40, 40);
button1.Location = new Point(30, 30);
button1.Text = "Click me";
this.Controls.Add(button1);
button1.Click += new EventHandler(button1_Click);
}
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show("Hello World");
}
}
And the code now runs, but does nothing. Not sure why, I don't really understand forms.