import win.ui;
import win.ui.menu;
/*DSG{{*/
var winform = win.form(parent=...; min=1;bottom=249;max=1;text="AAuto Form";border="resizable";right=349 )
winform.add(  )
/*}}*/

winform.popmenu = win.ui.popmenu(winform);//创建弹出菜单
winform.popmenu.add('&open',function(id){
	//在下面输入菜单响应代码
	
});
winform.popmenu.add();//分隔线
winform.popmenu.add('&exit',function(id){ winform.close() })
var menu = win.ui.menu(winform);//创建主菜单
menu.add('file',winform.popmenu)


import win.imagelist;
import win.ui.toolbar;
var iml = win.imagelist( 16, 16 );
iml.add(string.load("\res\toolbar.gif"), 0xff00ff/*透明色*/);
 
var tb = win.ui.toolbar(winform);	// 初始化 Toolbar
 
tb.create();						// 创建 Toolbar
tb.showLabel = false;				// 不在按钮上显示文字
tb.imageList = iml;					// 绑定 imageList
tb.add();							// 添加分隔条
tb.add("新建", function () {
	win.msgbox("新建");
}, 1);
tb.add("打开", function () {
	win.msgbox("打开");
}, 2);

winform.show(true) 
win.loopMessage();
return winform;
