All,
I’m working through some older python scripts written for earlier versions of Rhino that do not work in Rhino 8. Can someone tell me why the block of python code pasted below will work in Rhino 7 but not in Rhino 8?
Sorry for not posting the code example as preformatted text. My window would freeze when attempting to do this for some reason.
Also attached .py file.
Thanks,
Eric
import rhinoscriptsyntax as rs
import ctypes
def SetRhinoWindowPosition(x, y, w, h):
“”"
Sets the position and size of the Rhino main window.
“”"
hwnd = rs.WindowHandle()
# SWP_SHOWWINDOW = 0x0040
ctypes.windll.user32.SetWindowPos(hwnd, 0, x, y, w, h, 0x0040)
# Example: Move the window to (100, 100) with a size of 800x600
SetRhinoWindowPosition(100, 100, 800, 600)
SetWindowPos.py (408 Bytes)
3 posts - 1 participant