Yes it's very simple and takes like, 2 seconds to do something this easy but I am contributing.
So lets open C# Express (I have 2010, some of you might have 2008 but its basically the same)
Now lets create a Windows Form Application
Now after this we are going to double click on Program.cs
You should get a simple start up code that basically runs a blank form.
Now highlight everything, and click the backspace key! Yes, you are deleting all of it!
Now, this code MIGHT have extra stuff in it that isn't needed. But i know the code compiles with no errors. The reason why it might have some extra stuff is because I made a launcher for a server and gave it to them, still had the source so I decided to release a guide for it. So i ripped apart the source so it wouldn't look anything like it and this is what I got.
It a VERY simple code and I wouldn't suggest using it for a server lol.
If you do use it for a server you need to edit it and make it look alot better.
This is my first tutorial so, please don't flame.
Code:
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Net; using System.IO; using System.Runtime.InteropServices; using System.Threading; using Chat = System.Net; using System.Collections; using System.Runtime; public class Form1 : Form { public Form1() { InitializeComponent(); } #region Navigation private void buttonPlay_Click(object sender, EventArgs e) { System.Diagnostics.Process.Start("Conquer.exe"); Application.Exit(); } private void buttonExit_Click(object sender, EventArgs e) { Application.Exit(); } #endregion private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); this.buttonPlay = new System.Windows.Forms.Button(); this.buttonExit = new System.Windows.Forms.Button(); this.SuspendLayout(); // // buttonPlay // this.buttonPlay.Location = new System.Drawing.Point(2, 504); this.buttonPlay.Name = "buttonPlay"; this.buttonPlay.Text = "Play"; this.buttonPlay.Size = new System.Drawing.Size(128, 58); this.buttonPlay.TabIndex = 1; this.buttonPlay.UseVisualStyleBackColor = true; this.buttonPlay.Click += new System.EventHandler(this.buttonPlay_Click); // // buttonExit // this.buttonExit.Location = new System.Drawing.Point(449, 504); this.buttonExit.Name = "buttonExit"; this.buttonExit.Text = "Exit"; this.buttonExit.Size = new System.Drawing.Size(128, 58); this.buttonExit.TabIndex = 2; this.buttonExit.UseVisualStyleBackColor = true; this.buttonExit.Click += new System.EventHandler(this.buttonExit_Click); // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.SystemColors.ActiveCaptionText; this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; this.ClientSize = new System.Drawing.Size(579, 562); this.ControlBox = false; this.Controls.Add(this.buttonExit); this.Controls.Add(this.buttonPlay); this.MaximizeBox = false; this.MaximumSize = new System.Drawing.Size(595, 578); this.MinimumSize = new System.Drawing.Size(595, 578); this.Name = "Form1"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.ResumeLayout(false); } private Button buttonExit; private System.Windows.Forms.Button buttonPlay; [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); } }