Tuesday 19 April 2016

Customizing Windows Form in c#

Customizing Windows Form in c#

Code for customizing Form is given below

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 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