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. 只有在應用程式選擇進入每個監視器第2版、目標 .NET Framework 4.7.1 或更新版本EnableDpiChangedMessageHandling ,且已開啟和EnableDpiChangedHighDpiImprovements設定參數時,才會叫用方法。RescaleConstantsForDpiThe 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.

適用於