20 lines
365 B
Plaintext
20 lines
365 B
Plaintext
import win.ui;
|
|
|
|
// 创建父窗口
|
|
var mainForm = win.form(text="父窗口");
|
|
|
|
// 创建子窗口
|
|
var childForm = win.form(text="子窗口");
|
|
|
|
|
|
// 设置子窗口的父窗口为 mainForm
|
|
win.setParent(childForm.hwnd, mainForm.hwnd);
|
|
|
|
|
|
// 显示父窗口和子窗口
|
|
mainForm.show();
|
|
childForm.show();
|
|
childForm.setPos(0,0);
|
|
// 启动消息循环
|
|
win.loopMessage();
|