Impedir Form de mover

<< Click to Display Table of Contents >>

Navigation:  Desktop > Form >

Impedir Form de mover

Previous pageReturn to chapter overviewNext page

    public partial class Form1 : Form

    {

        private Point currentLocation = Point.Empty; 

 

        public Form1()

        {

            InitializeComponent();

        }

 

        private void Form1_Move(object sender, EventArgs e)

        {

            this.Location = currentLocation; 

        }

 

        private void Form1_Shown(object sender, EventArgs e)

        {

            this.Location = currentLocation; 

        }

    }