
Here is a little border I made out of a PictureB ox, You can simple move it around.
Source:
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);
}
}
}
}