Exemple #1
0
        void WinFrmLifecycleEvent_ViewTableControlEvent(UserControl control, System.Windows.Forms.Control parent)
        {
            Point p = new Point(20, 50);

            for (int i = 0; i < MainContent.Controls.Count; i++)
            {
                p.X += 20; p.Y += 20;
            }                                                                             //偏移控件的出现位置
            control.Location = p;
            parent.Controls.Add(control);
            MainContent.Activate();
            control.BringToFront();
        }