How to move form in C#.Net? -


Thank you for your last reply to my question, you can see the following link.

Now I have to face another problem. When I changed the border thing of my form to someone, I can not take the form like a real form. Its stationary and can not be transferred anywhere.

Windows can move the form anywhere in the normal border direction. But I want to move in this way to any border in this way, how can I do it? Please tell me if you can thank you for your time :)

public class AppFormBase: form {safe override zero onload ( EventArgs e) {if (This.FormBorderStyle == System.Windows.Forms.FormBorderStyle.None) {this.MouseDown + = New MouseEventHandler (AppFormBase_MouseDown); This.MouseMove + = New MouseEventHandler (AppFormBase_MouseMove); This.MouseUp + = New MouseEventHandler (AppFormBase_MouseUp); } Base.OnLoad (e); } Zero AppFormBase_MouseDown (Object Sender, MouseEventArgs e) {if (e.button! = MouseButtons.Left) {return; } Down point = new point (E.X, E.I.); } Zero AppFormBase_MouseMove (Object Sender, MouseEventArgs E) {If (downpoint == Point empty) {return; } Point = New point (this. Lift + E.X. - DownPoint.X, it.Tap + E.Y. - DownPoint Y); this. Location = location; } Zero AppFormBase_MouseUp (object sender, MouseEventArgs e) {if (e.button! = MouseButtons.Left) {return; } DownPoint = Point. Empty; } Public Point Down Point = Point Empty; }

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -