Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Design Time / April 2004

Tip: Looking for answers? Try searching our database.

Resize Left w/ Dock Right Bug

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Randy Charles Morin - 26 Apr 2004 18:28 GMT
I have an issue w/ the drawing of a very simple Window and am looking
for suggestions. I have a Form1, w/ a panel1 docked right and a panel2
docked fill. Run this simple application and drag the left resize
border quickly back and forth. You can see the right panel is resizing
and then springing back into form. Code attached.

Thanks for any help in advance,

Randy
http://www.kbcafe.com
x-MVP :)

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace TestResize
{
    /// <summary>
    /// Summary description for Form1.
    /// </summary>
    public class Form1 : System.Windows.Forms.Form
    {
        private System.Windows.Forms.Panel panel1;
        private System.Windows.Forms.Panel panel2;
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.Container components = null;

        public Form1()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        protected override void Dispose( bool disposing )
        {
            if( disposing )
            {
                if (components != null)
                {
                    components.Dispose();
                }
            }
            base.Dispose( disposing );
        }

        #region Windows Form Designer generated code
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.panel1 = new System.Windows.Forms.Panel();
            this.panel2 = new System.Windows.Forms.Panel();
            this.SuspendLayout();
            //
            // panel1
            //
            this.panel1.BackColor = System.Drawing.Color.Red;
            this.panel1.Dock = System.Windows.Forms.DockStyle.Right;
            this.panel1.Location = new System.Drawing.Point(488, 0);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(96, 422);
            this.panel1.TabIndex = 0;
            //
            // panel2
            //
            this.panel2.BackColor = System.Drawing.Color.Blue;
            this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
            this.panel2.Location = new System.Drawing.Point(0, 0);
            this.panel2.Name = "panel2";
            this.panel2.Size = new System.Drawing.Size(488, 422);
            this.panel2.TabIndex = 2;
            //
            // Form1
            //
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
            this.ClientSize = new System.Drawing.Size(584, 422);
            this.Controls.Add(this.panel2);
            this.Controls.Add(this.panel1);
            this.Name = "Form1";
            this.Text = "Form1";
            this.ResumeLayout(false);

        }
        #endregion

        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.Run(new Form1());
        }

    }
}
Randy Charles Morin - 27 Apr 2004 15:50 GMT
I guess the MVPs are tired of getting SPAMmed 4 answering questions in
these forums :(

Randy
http://www.kbcafe.com
x-MVP

> I have an issue w/ the drawing of a very simple Window and am looking
> for suggestions. I have a Form1, w/ a panel1 docked right and a panel2
[quoted text clipped - 109 lines]
>     }
> }
Jacob Grass [MVP] - 27 Apr 2004 18:20 GMT
> I have an issue w/ the drawing of a very simple Window and am looking
> for suggestions. I have a Form1, w/ a panel1 docked right and a panel2
> docked fill. Run this simple application and drag the left resize
> border quickly back and forth. You can see the right panel is resizing
> and then springing back into form.  Code attached.

<snip>

I can see some flicker, but I guess I'm not sure what your question is....
Maybe I'm not seeing the same thing that you are seeing.

Signature

Jacob Grass
Microsoft .NET MVP
Check out http://windowsforms.net

Randy Charles Morin - 28 Apr 2004 22:17 GMT
The best thing to do is change the color of the two panes. Make them
Red and Blue. Repeat. The flicker is horrifying. I'm just looking for
alternatives. I tried coding the positioning by hand, without any
success.

Thanks for your help Dude,

Randy
http://www.kbcafe.com

> > I have an issue w/ the drawing of a very simple Window and am looking
> > for suggestions. I have a Form1, w/ a panel1 docked right and a panel2
[quoted text clipped - 6 lines]
> I can see some flicker, but I guess I'm not sure what your question is....
> Maybe I'm not seeing the same thing that you are seeing.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.