Show / Hide Table of Contents

Method CenterOnScreen

| Edit this page View Source

CenterOnScreen(nint, double?, double?)

Centers the window on the current monitor

Declaration
public static void CenterOnScreen(nint hwnd, double? width = null, double? height = null)
Parameters
Type Name Description
nint hwnd

Window handle

double? width

Width of the window in device independent pixels, or null if keeping the current size

double? height

Height of the window in device independent pixels, or null if keeping the current size

  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX