Alois, Search in the list archive[1] for "double buffering" -- in particular, Chris Anderson has a post linking to a nice sample at www.gotdotnet.com
John [1] Search at: http://discuss.develop.com/archives/wa.exe?S1=DOTNET -----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.