示例#1
0
 private void pictureBox3_Click(object sender, EventArgs e)
 {
     if (MyUserInfo.currentUserId <= 0)
     {
         About about = new About();
         about.ShowDialog(this);
     }
     else
     {
         if (myMenu == null)
         {
             RECT rect = new RECT();
             WinApi.GetWindowRect(this.Handle, ref rect);
             int x = rect.Right - 72;
             WinApi.GetWindowRect(pictureBox3.Handle, ref rect);
             myMenu = new MenuControl(this);
             myMenu.StartPosition = FormStartPosition.Manual;
             myMenu.Location      = new Point(x, rect.Bottom);
             //myMenu.Size = new Size(72, 72);
             myMenu.Show();
         }
         else
         {
             myMenu.Close();
             myMenu = null;
         }
     }
 }