powerbuilder 如何屏蔽系统提示框

2024-11-02 19:12:01

1、新建一窗口,上面放置一按钮对象cb_msg,cb_msg的click事件代码-,Open('msg','这是一个测试关闭消息窗口的例子')

powerbuilder 如何屏蔽系统提示框

2、//---在窗口Local external Functions声明以下API函,Function long FindWindowA (String lpClassName , String lpWindowName ) Library "user32.dll"

powerbuilder 如何屏蔽系统提示框

3、//---窗口的open事件代码,Timer(2)//触发关闭消息窗口代码的时间间隔

powerbuilder 如何屏蔽系统提示框

4、//---Timer事件代码,Ulong handle,String ls_null,SetNull(ls_null),//获得该消息窗口的句柄

powerbuilder 如何屏蔽系统提示框

5、handle = FindWindowA(ls_null,'msg')//字符串"msg"为消息窗口的标题名称

powerbuilder 如何屏蔽系统提示框

6、If Iswindow(handle) Then,//向WINDOWS发送消息关闭窗口,256为wm_keydown消息的整型值,Post(handle,256,13,0),End If。

powerbuilder 如何屏蔽系统提示框
猜你喜欢