2012-04-16 40 views

Respuesta

64

Tal vez algo como esto:

yourformName.YourLabel.Font = new Font("Arial", 24,FontStyle.Bold); 

O si usted está en la misma clase que el formulario a continuación, simplemente hacer esto:

YourLabel.Font = new Font("Arial", 24,FontStyle.Bold); 

El constructor toma parámetros diffrent (así que escoja tu veneno). De esta manera:

Font(Font, FontStyle) 
Font(FontFamily, Single) 
Font(String, Single) 
Font(FontFamily, Single, FontStyle) 
Font(FontFamily, Single, GraphicsUnit) 
Font(String, Single, FontStyle) 
Font(String, Single, GraphicsUnit) 
Font(FontFamily, Single, FontStyle, GraphicsUnit) 
Font(String, Single, FontStyle, GraphicsUnit) 
Font(FontFamily, Single, FontStyle, GraphicsUnit, Byte) 
Font(String, Single, FontStyle, GraphicsUnit, Byte) 
Font(FontFamily, Single, FontStyle, GraphicsUnit, Byte, Boolean) 
Font(String, Single, FontStyle, GraphicsUnit, Byte, Boolean) 

Referencia here

5

Esto debe hacerlo (en negrita también);

label1.Font = new Font("Serif", 24,FontStyle.Bold); 
7

utilizar éste para cambiar no sólo el tamaño de letra del nombre de la fuente

label1.Font = new System.Drawing.Font(label1.Font.Name, 24F); 
0

También puede crear una variable y luego asignarla para un texto. Es genial porque puedes asignarle dos o más textos.

Para asignar una variable de hacer eso

public partial class Sayfa1 : Form 

    Font Normal = new Font("Segoe UI", 9, FontStyle.Bold); 

    public Sayfa1() 

Esta varible no está asignada a ningún yet.To texto no se escribe el nombre del texto (Mira proporties -> (nombre)) a continuación, escribir " .Font ", luego llama al nombre de tu variable de fuente.

lupusToolStripMenuItem.Font = Normal; 

Ahora tiene un texto asignado a una fuente Normal. Espero ser útil.

Cuestiones relacionadas