$PBExportHeader$w_toast.srw $PBExportComments$弹窗提示 forward global type w_toast from window end type type st_1 from statictext within w_toast end type end forward global type w_toast from window integer width = 1001 integer height = 200 boolean border = false windowtype windowtype = popup! long backcolor = 67108864 string icon = "AppIcon!" integer transparency = 10 st_1 st_1 end type global w_toast w_toast type prototypes //function long shCenterWindow(long hWnd) library "pbvm90.dll" end prototypes on w_toast.create this.st_1=create st_1 this.Control[]={this.st_1} end on on w_toast.destroy destroy(this.st_1) end on event open;s_toast_parm s_parm s_parm = Message.PowerObjectParm if not IsValid(s_parm) then Close(this) return end if if IsNull(s_parm) then Close(this) return end if if (s_parm.showtime <= 0) then Close(this) return end if // 窗口居中 this.Width = s_parm.Width this.Height = s_parm.Height long ll_ScreenH,ll_ScreenW Environment le_Env GetEnvironment(le_Env) ll_ScreenH = PixelsToUnits(le_Env.ScreenHeight, YPixelsToUnits!) ll_ScreenW = PixelsToUnits(le_Env.ScreenWidth , XPixelsToUnits!) this.Y = (ll_ScreenH - this.Height) / 2 this.X = (ll_ScreenW - this.Width ) / 2 //shCenterWindow(handle(this)) long halfHeight halfHeight = s_parm.Height / 2 st_1.Width = this.Width st_1.Y = (this.Height - st_1.Height) / 2 st_1.Text = s_parm.msg Timer(s_parm.showtime) end event event timer;Close(this) end event type st_1 from statictext within w_toast integer y = 60 integer width = 567 integer height = 80 integer textsize = -12 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = fixed! fontfamily fontfamily = modern! string facename = "幼圆" long textcolor = 33554432 long backcolor = 67108864 string text = "none" alignment alignment = center! boolean focusrectangle = false end type