Moving a custom border with no border style[c#]

  • Hello Guest! Welcome to ConsoleCrunch, to help support our site check out the premium upgrades HERE! to get exclusive access to our hidden content.
  • Unable to load portions of the website...
    If you use an ad blocker addon, you should disable it because it interferes with several elements of the site and blocks more than just adverts.
  • Read Rules Before Posting Post Virus Scans with every program.

Psycho_Coder

Active Poster
Retired Staff
Active Member
Apr 12, 2014
642
481
133
UK
3qfzIyk.png


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); 
            }
        }
    }
}

​
 
General chit-chat
Help Users
  • Chat Bot:
    88vbet1nett is our newest member. Welcome!
  • Chat Bot:
    nohu90tvco1 is our newest member. Welcome!
  • Chat Bot:
    mb88spro1 is our newest member. Welcome!
  • Chat Bot:
    jw88tvcom2 is our newest member. Welcome!
  • Chat Bot:
    vn8886com2 is our newest member. Welcome!
  • Chat Bot:
    Netflixgray is our newest member. Welcome!
  • Chat Bot:
    maxi666 is our newest member. Welcome!
  • Chat Bot:
    QM|T has joined the room.
  • Chat Bot:
    fuadiuy is our newest member. Welcome!
  • Chat Bot:
    hamza.butt223 is our newest member. Welcome!
  • Chat Bot:
    homiejo89 is our newest member. Welcome!
  • Chat Bot:
    ANGUS0023233 has joined the room.
  • Chat Bot:
    cakhiatv3cc is our newest member. Welcome!
  • Chat Bot:
    Marcus00 is our newest member. Welcome!
  • Chat Bot:
    h13io2 is our newest member. Welcome!
  • Chat Bot:
    QM|T has joined the room.
  • Chat Bot:
    encoDex is our newest member. Welcome!
  • Chat Bot:
    hp66social is our newest member. Welcome!
  • Chat Bot:
    hp66social has posted a new profile post.
  • Chat Bot:
    asunri is our newest member. Welcome!
  • @ asunri:
    anyone here? I am looking at the dlc files for minecraft 1.84 BLES variant but i dont see the .rap file?
  • @ asunri:
    BLES*
  • @ QM|T:
    what post you looking at
  • Chat Bot:
    meklavn645 is our newest member. Welcome!
  • Chat Bot:
    egal66 is our newest member. Welcome!
      Chat Bot: egal66 is our newest member. Welcome!