godking.message.group(winform) = 创建屏幕右下角弹出提示框组\n参数:父窗口对象或父窗口句柄\n不指定父窗口时,默认取当前线程活动窗口作为父窗口
演示效果
调用代码
import win.ui;
/*DSG{{*/
var winform = win.form(text="aardio form";right=759;bottom=469)
winform.add(
button={cls="button";text="Button";left=224;top=320;right=344;bottom=384;z=1};
button2={cls="button";text="Button";left=408;top=320;right=528;bottom=384;z=2}
)
/*}}*/
import godking.message;
var t = godking.message.group(winform);
t.setTopMost(true);
winform.button.oncommand = function(id,event){
t.info("2秒后自动关闭",2000)
t.err("1秒后自动关闭",1000)
t._message.showOK = true
t.frown("你必须手动关闭哦!",0)
t._message.showOK = false
t.great("太好了,自己关闭吧",0)
}
winform.button2.oncommand = function(id,event){
t.closeAll()
}
winform.onClose = function(hwnd,message,wParam,lParam){
t.closeAll()
}
winform.show();
win.loopMessage();
如果在无窗口程序中使用,方法如下:
import godking.message
var t = godking.message.group()
t.info("2秒后自动关闭",2000)
t.err("1秒后自动关闭",1000)
t._message.showOK = true
t.frown("你必须手动关闭哦!",0)
t._message.showOK = false
t.great("太好了,自己关闭吧",0)
win.loopMessage()
t._message.showOK = false
t.great("太好了,自己关闭吧",0)
win.loopMessage()