private void ShowForm() { this.Show(); BackgroundObject.Show(); CentreObject.Show(); foreach (DockItemObject o in MainDockObjects) { o.Show(); } isShown = true; this.hideToolStripMenuItem.Text = LanguageWords.MainContextMenu.HideWord; }
public void InitializeCentreObject() { Size tempSize = new Size(DockSettings.CentreImage.Width, DockSettings.CentreImage.Height); CentreObject = new BaseDockObjects.CentreObject(this, LanguageWords, DockSettings, "CentreImage", tempSize); //CentreObject.TopLevel = false; //CentreObject.Parent = BackgroundObject; CentreObject.Owner = BackgroundObject; // MainForm handles all the location and sizing of the objects //Size tempBackgroundObjectSize = BackgroundObject.ObjectSize; //CentreObject.Location = new Point(BackgroundObject.Location.X + tempBackgroundObjectSize.Width / 2 - tempSize.Width / 2, // BackgroundObject.Location.Y + tempBackgroundObjectSize.Height / 2 - tempSize.Height / 2); CentreObject.Location = new Point(SystemInformation.VirtualScreen.Right / 2 - tempSize.Width / 2, SystemInformation.VirtualScreen.Bottom / 2 - tempSize.Height / 2); CentreObject.DrawBitmapManaged(tempSize.Width, tempSize.Height, false, 0, 0, false, 0, 0, 0, 0, false, 0); CentreObject.Show(); CentreObject.BringToFront(); }