How do I position my form to the bottom right of the screen when it opens up the first time above the system tray?
Do as follows in your Form’s constructor after setting the StartPosition to Manual: [C#] this.SetBounds(Screen.GetWorkingArea(this).Width-this.Width ,Screen.GetWorkingArea(this).Height-this.Height , this.Width, this.Height); [VB.Net] Me.SetBounds(Screen.GetWorkingArea(Me).Width-Me.Width ,Screen.GetWorkingArea(Me).Height-Me.Height , Me.Width, Me.Height)
How do I determine the working area of a screen without the systemtray area?
The Screen.GetWorkingArea(control) will provide you the working area of a screen without the system tray area.
How do I paint in my mdi container, a logo, for example?
You should not try listening to your MDI container Form’s Paint event, instead listen to the Paint event of the MDIClient control that is a child of the mdi container form. This article provides you a detailed example: Painting in the MDI Client Area
How can I tell my form is being used in design time and not runtime
Check the the property Form.DesignMode. But, note that when in Visual Inheritance mode (designing a derived form), your Control’s DesignMode property will be true when the base form’s constructor gets executed in the design-time. To workaround this, you could check if the app in which your control is running is not devenv.exe, as follows: string exePath = Application.ExecutablePath; exePath = exePath.ToLower(); if(Application.ExecutablePath.ToLower().IndexOf(‘devenv.exe’) > -1) { // Then you are running in vs.net. }
How do I launch IE or any other process from code?
You can do so using the System.Diagnostics.Process.Start method as follows: // Just specifying the document name will open the appropriate app based on system settings. Process.Start(‘Http://msdn.microsoft.com’) // Open a word document in Word. Process.Start(‘AWordDocument.doc’) // Or open the app directly: Process.Start()