Windows Forms First Run
Windows Forms First Project
using System;
using System.Windows.Forms;
using System.Drawing;
using System.Reflection;
namespace myWF_first_test
{
public class MyForm : Form
{
public static MyForm EntryPoint1;
private System.ComponentModel.IContainer components = null;
private System.Windows.Forms.Button HCTplButton3;
public MyForm(string[] args) {
try {
EntryPoint1 = this;
#region initialize
this.SuspendLayout();
this.Size = new Size(400, 300);
EntryPoint1.Text = "Project Windows Forms";
EntryPoint1.AllowDrop = true;
new ToolTip() { AutoPopDelay = 5000, InitialDelay = 1000, ReshowDelay = 500, ShowAlways = true }.SetToolTip(EntryPoint1, "Подсказка...");
EntryPoint1.Text = "Project Windows Forms";
EntryPoint1.FormBorderStyle = FormBorderStyle.Fixed3D;
HCTplButton3 = new System.Windows.Forms.Button();
addWidget(this, HCTplButton3, 49, 56, 180, 75);
HCTplButton3.Click += (s, e) => {
EntryPoint1.Text = ((int)MessageBox.Show("Привет Мир!", "Project Windows Forms", MessageBoxButtons.OK, MessageBoxIcon.Asterisk)).ToString();
};
HCTplButton3.Enabled = false;
HCTplButton3.Cursor = Cursors.Hand;
new ToolTip() { AutoPopDelay = 5000, InitialDelay = 1000, ReshowDelay = 500, ShowAlways = true }.SetToolTip(HCTplButton3, "Кнопка...");
HCTplButton3.Text = "ЖМИ...";
this.ResumeLayout(false);
this.PerformLayout();
#endregion
#region main body
HCTplButton3.Enabled = true;
#endregion
}
catch { }
}
protected override void Dispose(bool disposing) {
if (disposing && (components != null)) {
components.Dispose();
}
base.Dispose(disposing);
}
private void addWidget(Control frame, Control ctl, int x, int y, int w, int h) {
ctl.SetBounds(x, y, w, h, BoundsSpecified.All);
frame.Controls.Add(ctl);
ctl.BringToFront();
}
[STAThreadAttribute]
static void Main(string[] args) {
Application.EnableVisualStyles();
Application.ThreadException += (s, e) => {
};
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
AppDomain.CurrentDomain.UnhandledException += (s, e) => {
};
Application.Run(new MyForm(args));
}
}
}
// Made by HiAsm.NET version 1.0.0.41