Happy Codings - Programming Code Examples
Html Css Web Design Sample Codes CPlusPlus Programming Sample Codes JavaScript Programming Sample Codes C Programming Sample Codes CSharp Programming Sample Codes Java Programming Sample Codes Php Programming Sample Codes Visual Basic Programming Sample Codes


CSharp Programming

CSharp > Code Examples

BorderLess Window

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
BorderLess Window using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; public class Form1 : System.Windows.Forms.Form { private Button myButton; public Form1() { this.AutoScaleBaseSize = new System.Drawing.Size(8, 18); this.ClientSize = new System.Drawing.Size(280, 320); this.ControlBox=false; this.MaximizeBox=false; this.MinimizeBox=false; this.FormBorderStyle=FormBorderStyle.None; myButton = new Button(); myButton.Text = "Superman"; myButton.Location = new System.Drawing.Point(69, 36); myButton.Size = new System.Drawing.Size(180, 50); myButton.Click+=new EventHandler(Close_Window); Controls.Add(myButton); } public void Close_Window(object sender,EventArgs eArgs) { ((Form)((Button)sender).Parent).Close(); } static void Main() { Application.Run(new Form1()); } }