getHwnd

getHwnd(): Integer64;

The getHwnd method of the Window class returns the Microsoft Windows handle for a form or control.

Use this method instead of the Window class hwnd method. Although these methods return the same value if the value is a 32-bit integer, if you call the hwnd method and the Window handle is larger than a 32-bit integer, exception 1406 (Result of expression overflows Integer precision) is raised.

If a node can execute as a 32‑bit or a 64‑bit node, you should use the getWindowHandle method, which returns a MemoryAddress to ensure that the correct Windows handle is used.