Vs Basic Border

iGArabZz

Member
Messages
79
Reaction score
81
Points
18
Many people use the metro framework to make there tools look nice, as I do love the design, most tools look the same and lack originality, so here is a little way to spice things up! Get creative and make your master piece stand out with borders!

t7my47.jpg



Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApplication6
{
    public partial class Form1 : Form
    {
        int border;
        int MoveX;
        int MoveY;
        public Form1()
        {
            InitializeComponent();
          
        }

        private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
        {
            border = 1;
            MoveX = e.Y;
            MoveY = e.Y;

        }

        private void pictureBox1_MouseUp(object sender, MouseEventArgs e)
        {
            border = 0;
        }

        private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
        {
            if (border == 1)
            {
                this.SetDesktopLocation(MousePosition.X - MoveX, MousePosition.Y - MoveY);
            }
        }
    }
}

Very basic, but can be made useful!
 
Top