Example #1
0
        private void ContactsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            contacts = new ContactBook(data, savedContactList);
            this.calendarPanel.Hide();
            //this.calendarTableLayout.Hide();
            contacts.TopLevel = false;
            contacts.TopMost  = true;
            contacts.Activate();

            //this.calendarPanel.Controls.Add(this.contacts);
            //this.calendarPanel.Dock = System.Windows.Forms.DockStyle.Fill;
            //contacts.Dock = System.Windows.Forms.DockStyle.Fill;

            //contacts.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top)
            //| System.Windows.Forms.AnchorStyles.Left)
            //| System.Windows.Forms.AnchorStyles.Right)));
            //contacts.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            //contacts.AutoSize = true;
            //contacts.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;

            this.Controls.Add(contacts);
            //this.Size = new System.Drawing.Size(200, 338);
            contacts.Show();
            this.Text = "Contact View";
        }
Example #2
0
 private void ContactsToolStripMenuItem_DoubleClick(object sender, EventArgs e)
 {
     contacts = new ContactBook(data, savedContactList);
     this.calendarPanel.Hide();
     contacts.TopLevel = false;
     contacts.TopMost  = true;
     this.Controls.Add(contacts);
     this.Dock            = System.Windows.Forms.DockStyle.Fill;
     this.contacts.Dock   = System.Windows.Forms.DockStyle.Fill;
     this.contacts.Anchor = AnchorStyles.Left;
     this.contacts.Anchor = AnchorStyles.Right;
     contacts.Show();
     this.Text = "Contact View";
 }