Form.GetAutoScaleSize(Font) Metoda

Definicja

Przestroga

This method has been deprecated. Use the AutoScaleDimensions property instead. http://go.microsoft.com/fwlink/?linkid=14202

Przestroga

This method has been deprecated. Use the AutoScaleDimensions property instead. https://go.microsoft.com/fwlink/?linkid=14202

Pobiera rozmiar podczas automatycznego skalowania formularza na podstawie określonej czcionki.

public:
 static System::Drawing::SizeF GetAutoScaleSize(System::Drawing::Font ^ font);
public static System.Drawing.SizeF GetAutoScaleSize (System.Drawing.Font font);
[System.Obsolete("This method has been deprecated. Use the AutoScaleDimensions property instead.  http://go.microsoft.com/fwlink/?linkid=14202")]
public static System.Drawing.SizeF GetAutoScaleSize (System.Drawing.Font font);
[System.Obsolete("This method has been deprecated. Use the AutoScaleDimensions property instead.  https://go.microsoft.com/fwlink/?linkid=14202")]
public static System.Drawing.SizeF GetAutoScaleSize (System.Drawing.Font font);
static member GetAutoScaleSize : System.Drawing.Font -> System.Drawing.SizeF
[<System.Obsolete("This method has been deprecated. Use the AutoScaleDimensions property instead.  http://go.microsoft.com/fwlink/?linkid=14202")>]
static member GetAutoScaleSize : System.Drawing.Font -> System.Drawing.SizeF
[<System.Obsolete("This method has been deprecated. Use the AutoScaleDimensions property instead.  https://go.microsoft.com/fwlink/?linkid=14202")>]
static member GetAutoScaleSize : System.Drawing.Font -> System.Drawing.SizeF
Public Shared Function GetAutoScaleSize (font As Font) As SizeF

Parametry

font
Font

Reprezentująca Font czcionkę określającą autoskalowany rozmiar podstawowy formularza.

Zwraca

Reprezentująca SizeF rozmiar autoskalowanego formularza.

Atrybuty

Uwagi

Ważne

Metoda GetAutoScaleSize jest przestarzała, począwszy od .NET Framework 2.0. Ten element członkowski został zachowany w celu zapewnienia zgodności z poprzednimi wersjami. Aby uzyskać więcej informacji na temat automatycznego skalowania, zobacz Automatyczne skalowanie w Windows Forms.

Tej metody można użyć do określenia rozmiaru, który formularz automatycznie skaluje dla określonej czcionki przed zastosowaniem czcionki do formularza. Jeśli chcesz określić rozmiar formularza jest automatycznie skalowany na podstawie czcionki aktualnie przypisanej do formularza, użyj AutoScaleBaseSize właściwości .

Dotyczy

Zobacz też