1、先创建可视化控件
2、选择statictext类型
3、复制下面代码替换edit source中语法。
forward
global type uo_button from statictext
end type
end forward
global type uo_button from statictext
integer width = 411
integer height = 128
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 border = true
borderstyle borderstyle = styleraised!
boolean focusrectangle = false
event uo_down pbm_lbuttondown
event uo_up pbm_lbuttonup
end type
global uo_button uo_button
event uo_down;this.borderstyle=stylelowered!
end event
event uo_up;this.borderstyle=styleraised!
end event
on uo_button.create
end on
on uo_button.destroy
end on
效果图: