Form.GetAutoScaleSize(Font) Méthode

Définition

Attention

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

Attention

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

Obtient la taille du formulaire lors de sa mise à l'échelle automatique en fonction d'une police spécifiée.

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

Paramètres

font
Font

Font représentant la police sur la base de laquelle sera déterminée la taille du formulaire ajusté automatiquement.

Retours

SizeF

SizeF représentant la taille ajustée automatiquement du formulaire.

Attributs

Remarques

Important

La GetAutoScaleSize méthode est obsolète à partir du .NET Framework 2.0. Ce membre a été conservé pour la compatibilité descendante. Pour plus d’informations sur la mise à l’échelle automatique, consultez Mise à l’échelle automatique dans Windows Forms.

Vous pouvez utiliser cette méthode pour déterminer la taille d’un formulaire à mettre à l’échelle automatiquement pour une police spécifique avant d’appliquer la police au formulaire. Si vous souhaitez déterminer la taille d’un formulaire est automatiquement mise à l’échelle en fonction de la police actuellement affectée au formulaire, utilisez la AutoScaleBaseSize propriété.

S’applique à

Voir aussi