Program dissapears 08-12-2014, 03:59 PM
#1
I decided to get rid of the border and make it set to "None".
and apply a picture box as it.
Hence, setting the code to this.
It dissapears when clicking on the custom border.
and apply a picture box as it.
Hence, setting the code to this.
It dissapears when clicking on the custom border.
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 The_spirit
{
public partial class Form1 : Form
{
int TogMove;
int MValX;
int MValY;
public Form1()
{
InitializeComponent();
}
private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
{
TogMove = 1;
MValX = e.X;
MValY = e.Y;
}
private void pictureBox1_MouseUp(object sender, MouseEventArgs e)
{
TogMove = 0;
}
private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
{
if(TogMove==1)
{
this.SetDesktopLocation(MousePosition.X - MValX, MousePosition.Y - MValY);
}
}
}
}

![[+]](https://sinister.li/images/modern/collapse_collapsed.png)
![[Image: iQ3pcQu.png]](http://i.imgur.com/iQ3pcQu.png)