ToolStrip.RescaleConstantsForDpi(Int32, Int32) ToolStrip.RescaleConstantsForDpi(Int32, Int32) ToolStrip.RescaleConstantsForDpi(Int32, Int32) ToolStrip.RescaleConstantsForDpi(Int32, Int32) Method

定義

當在衍生類別中遭覆寫時,會處理任何用於控制項繪製之魔術數字的重新調整。When overridden in a derived class, handles the rescaling of any magic numbers that are used in control painting.

protected:
 override void RescaleConstantsForDpi(int deviceDpiOld, int deviceDpiNew);
protected override void RescaleConstantsForDpi (int deviceDpiOld, int deviceDpiNew);
override this.RescaleConstantsForDpi : int * int -> unit
Protected Overrides Sub RescaleConstantsForDpi (deviceDpiOld As Integer, deviceDpiNew As Integer)

參數

deviceDpiOld
Int32 Int32 Int32 Int32

舊的 DPI 值。The old DPI value.

deviceDpiNew
Int32 Int32 Int32 Int32

新的 DPI 值。The new DPI value.

備註

您必須呼叫基底類別方法,以取得目前的 DPI 值。You must call the base class method to get the current DPI values. RescaleConstantsForDpi只有在應用程式時,才會叫用方法每個監視第 2 版,以.NET Framework 4.7.1 為目標或更新版本,且EnableDpiChangedMessageHandlingEnableDpiChangedHighDpiImprovements開啟的組態參數。The RescaleConstantsForDpi method is invoked only when an application opts into per-monitor version 2, targets .NET Framework 4.7.1 or later, and has the EnableDpiChangedMessageHandling and EnableDpiChangedHighDpiImprovements configuration switches turned on.

適用於