---make.bat---
@echo off
for /f "usebackq" %%d in (`dir/w %WINDIR%\Microsoft.NET\Framework ^| findstr [v`) do set dotnetdir=%%d
set dotnetdir=%dotnetdir:[=%
set dotnetdir=%dotnetdir:]=%
rem echo %dotnetdir%
set CSCOMPILER=%windir%\Microsoft.NET\Framework\%dotnetdir%\csc.exe
Β %CSCOMPILER% /target:winexe /main:App /platform:anycpu /out:skeleton.exe Main.cs Form1.cs
pause
---end make.bat---
Β ---Main.cs---
using System;
using System.Windows.Forms;
Β Β class App
{
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.Run(new Form1());
}
}
---end Main.cs---
Β ---Form1.cs---
using System;
using System.Windows.Forms;
Β Β class Form1 : Form
{
static Button Button1;
Β public Form1()
{
Button1 = new Button();
Button1.Top = 10;
Button1.Left = 10;
Button1.Text = "hello";
Button1.Click += new EventHandler(Button1_Click);
this.Controls.Add(Button1);
}
Β private void Button1_Click(object sender, System.EventArgs e)
{
MessageBox.Show("hello");
}
}
---end Form1.cs---
Comments
0 B
|π
/π
0 B
|π
/π
0 B
|π
/π
0 B
|π
/π
0 B
|0 π
/0 π
0 B
|π
/π
0 B
|π
/π
0 B
|π
/π
0 B
|π
/π