--- title: 动态窗口大小、居中 updated: 2022-03-08 01:28:02Z created: 2022-03-08 01:26:16Z --- 使用`setPos`可动态调整窗口大小,调整前需禁用dpiscaling,调整后再打开 ```js winform.enableDpiScaling(false) winform.setPos(,,left+(w+padd)*size+left*2,top + ((w+padd)*(size+1))) winform.enableDpiScaling() winform.center(0) ```