Possible Duplicate:
Fixing the position of a form
in my application some forms must be not moving by users. how can i disable move forms another location.
i put that code on form_load
this.ControlBox = false; this.Text = string.Empty;
when form's title is empty form cant be move another location. but i want to keep form title.
is there a way?
I'm not sure this is the best way, but you can do something like in following code to avoid changing form current location :
    public Form1()
    {
        InitializeComponent();
        pt = this.Location;
    }
    private Point pt;
    private void Form1_Move(object sender, EventArgs e)
    {
        this.Location = pt;
    }
hope this help.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论