参考:https://bbs.csdn.net/topics/370215834
效果图:
1、建立一个可视用户对象 uo_transparent,类型为statictext,创建实例变量 boolean ib_painting
forward
global type uo_transparent from statictext
end type
end forward
global type uo_transparent from statictext
integer width = 457
integer height = 72
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 33554432
long backcolor = 67108864
boolean focusrectangle = false
event ue_paint pbm_paint
end type
global uo_transparent uo_transparent
type variables
boolean ib_painting
end variables
event ue_paint;IF IsValid(This) THEN
if ib_painting THEN Return 0
ib_painting = True
This.Visible = False
Do While Yield()
Loop
This.Visible = True
ib_painting = False
END IF
Return 0
end event
on uo_transparent.create
end on
on uo_transparent.destroy
end on
event constructor;This.backcolor = 2^29
end event