Friday, 22 April 2016
Tuesday, 19 April 2016
Customizing Windows Form in c#
Customizing Windows Form in c#
Code for customizing Form is given below
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace blog_programs
{
public partial class customizng_a_window_form : Form
{
public customizng_a_window_form()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
this.FormBorderStyle = FormBorderStyle.FixedDialog;
}
private void button2_Click(object sender, EventArgs e)
{
this.Size = new Size(300, 500);
}
private void button3_Click(object sender, EventArgs e)
{
this.Opacity = 0.5;
}
}
}
Results:
The above Sreenshot is for form border style
The above screenshot is for resize
The above Screenshot is for opacity
Tutorial From highclonoidsoftec.com
Saturday, 16 April 2016
Non rectangular Form @ highclonoidsoftec.com
Non rectangular Form Development in C#.net
The given below code is for creating a non rectangular form.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace blog_programs
{
public partial class non_rectangular_form : Form
{
System.Drawing.Drawing2D.GraphicsPath mypath = new System.Drawing.Drawing2D.GraphicsPath();
The code in orange background is the class which is used.
Which has the function which support the code given below
public non_rectangular_form()
{
InitializeComponent();
}
private void non_rectangular_form_Load(object sender, EventArgs e)
{
mypath.AddEllipse(0, 0, this.Width, this.Height);
Region myregion = new Region(mypath);
this.Region = myregion;
}
}
}
The given below code is for creating a non rectangular form.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace blog_programs
{
public partial class non_rectangular_form : Form
{
System.Drawing.Drawing2D.GraphicsPath mypath = new System.Drawing.Drawing2D.GraphicsPath();
The code in orange background is the class which is used.
Which has the function which support the code given below
public non_rectangular_form()
{
InitializeComponent();
}
private void non_rectangular_form_Load(object sender, EventArgs e)
{
mypath.AddEllipse(0, 0, this.Width, this.Height);
Region myregion = new Region(mypath);
this.Region = myregion;
}
}
}
Subscribe to:
Posts (Atom)