-----Original Message----- From: John St. Clair [mailto:[EMAIL PROTECTED]] >Search in the list archive[1] for "double buffering" -- in particular,
Hi John, Well, maybe this is what I mean, but iīm not sure if this is what I need. All I want to do is set the form to a mode, where no user can do changes to the location and/or size to the form with the mouse. The only to do this should be via my own piece of code. Regards, Alois -----Original Message----- From: dotnet discussion [mailto:[EMAIL PROTECTED]] On Behalf Of Alois Reisinger Sent: Tuesday, May 07, 2002 1:33 PM To: [EMAIL PROTECTED] Subject: [DOTNET] prohibit window from moving by mouse Hi everyone, I have a form that is programmatically attached to my glue i a way like you can see below. This works fine. The glued window moves along with the "parent" one. But what i try to move the glued window itself with the mouse, it produces some awful flicker, although it stayes at its place. So how can i prevent this? Best regards alois --snip // Donīt worry about initialization of some variables.... // itīs just a snippet public Constructor() { LocationChanged += new System.EventHandler(this.LocChange); Resize += new System.EventHandler(this.LocChange); gluedwindow.Resize += new System.EventHandler(this.LocChange); gluedwindow.LocationChanged += new System.EventHandler(this.LocChange); } [...] private void LocChange(object sender,System.EventArgs e) { if (gluedwindow!=null) { gluedwindow.Left = this.Right + 1; gluedwindow.Top = this.Top; System.Drawing.Size gs = gluedwindow.Size; gs.Height = this.Size.Height; gluedwindow.Size = gs; } } ---snap You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.