Custom Windows C#.NET PROGRAM

We create our own custom appearance user interfaces, witch we will find to be much more easy then we have ever expected.
 using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace customwindow
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private bool mouse_is_down = false;
        private Point mouse_pos;
        private void pictureBox2_Click(object sender, EventArgs e)
        {
            this.Close();
        }
        private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
        {
            mouse_is_down = true;
            mouse_pos.X = e.X;
            mouse_pos.Y = e.Y;
            pictureBox1.Image = new Bitmap("C:\\educationportal\\C#\\customwindow\\customwindow\\images\\0612061L.jpg");
            pictureBox1.SizeMode = PictureBoxSizeMode.AutoSize;
        }
        private void pictureBox1_MouseUp(object sender, MouseEventArgs e)
        {
            mouse_is_down = false;
        }
        private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
        {
            if (mouse_is_down)
            {
                Point current_pos = Control.MousePosition;
                current_pos.X = current_pos.X - mouse_pos.X;
                current_pos.Y = current_pos.Y - mouse_pos.Y;
                this.Location = current_pos;
            }
                    }
        private void Form1_Load(object sender, EventArgs e)
        {
        }
    }
}

OUTPUT
 
Share:

Total Pageviews

CONTACT US

Prof. Roshan P. Helonde
Mobile: +917276355704
WhatsApp: +917276355704
Email: roshanphelonde@rediffmail.com

Enter Project Title

Popular Projects

All Archive

Contact Form

Name

Email *

Message *