2009-09-06 7 views

Respuesta

42

a intentar algo en las líneas de

Rectangle workingArea = Screen.GetWorkingArea(this); 
this.Location = new Point(workingArea.Right - Size.Width, 
          workingArea.Bottom - Size.Height); 

espero que funcione bien para usted.

+0

Excelente. Gracias por esto, me gustaría poder aceptar esto como la respuesta: p –

0

En usted forma constructor de poner el siguiente código:

StartPosition = FormStartPosition.Manual; 

Esto fijará la posición de inicio de la forma a lo que se establece como valor para la ubicación del formulario (se puede configurar esto en el diseñador de formularios) .

+1

problema con esto es que todo el mundo utilizan pantallas de diferente tamaño, que podría verse bien en el suyo, pero no quiere decir que será en un –

+0

clientes ... 1 - Sí, supongo que había necesidad de que uno también, para hacer que el formulario use la ubicación que especifique. –

10
Form2 a = new Form2(); 
a.StartPosition = FormStartPosition.Manual; 
a.Location = new Point(Screen.PrimaryScreen.WorkingArea.Width - a.Width, 
         Screen.PrimaryScreen.WorkingArea.Height - a.Height); 
0

Esto funcionó para mí; acabo de poner las 3 líneas de código que aparece a continuación después de mi InitializeComponent();

public FormProgress() 
{ 
    InitializeComponent(); 
    Rectangle r = Screen.PrimaryScreen.WorkingArea; 
    this.StartPosition = FormStartPosition.Manual; 
    this.Location = new Point(Screen.PrimaryScreen.WorkingArea.Width - this.Width, Screen.PrimaryScreen.WorkingArea.Height - this.Height); 
} 
0

Es fácil de tratar;

//Get screen resolution 
Rectangle res = Screen.PrimaryScreen.Bounds; 

// Calculate location (etc. 1366 Width - form size...) 
this.Location = new Point(res.Width - Size.Width, res.Height - Size.Height); 
Cuestiones relacionadas