B Bram Jul 15, 2007 #2 Hi Adrian, Presumably, something like this should work: public class Form1 : Form { Point location; protected override void OnShown(EventArgs e) { base.OnShown(e); location = this.Location; } protected override void OnMove(EventArgs e) { base.OnMove(e); if(!this.Location.Equals(location)) { this.Location = location; } } }
Hi Adrian, Presumably, something like this should work: public class Form1 : Form { Point location; protected override void OnShown(EventArgs e) { base.OnShown(e); location = this.Location; } protected override void OnMove(EventArgs e) { base.OnMove(e); if(!this.Location.Equals(location)) { this.Location = location; } } }
A > Adrian Jul 15, 2007 #3 Thank you very much. Adrian. Bram said: Hi Adrian, Presumably, something like this should work: public class Form1 : Form { Point location; protected override void OnShown(EventArgs e) { base.OnShown(e); location = this.Location; } protected override void OnMove(EventArgs e) { base.OnMove(e); if(!this.Location.Equals(location)) { this.Location = location; } } } Click to expand...
Thank you very much. Adrian. Bram said: Hi Adrian, Presumably, something like this should work: public class Form1 : Form { Point location; protected override void OnShown(EventArgs e) { base.OnShown(e); location = this.Location; } protected override void OnMove(EventArgs e) { base.OnMove(e); if(!this.Location.Equals(location)) { this.Location = location; } } } Click to expand...