$PBExportHeader$uo_text_m_main.sru forward global type uo_text_m_main from statictext end type end forward global type uo_text_m_main from statictext integer width = 261 integer height = 72 integer textsize = -11 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" string pointer = "HAND.CUR" long textcolor = 33554432 long backcolor = 16777215 string text = "none" boolean focusrectangle = false event mousemove pbm_mousemove event key pbm_keydown end type global uo_text_m_main uo_text_m_main type variables long colour_on=0 ,colour_leave=0 int ifonraise=0 Boolean ib_mousein end variables event mousemove;IF ib_mousein <> (xpos > 0 AND ypos > 0 AND xpos < Width AND ypos < Height) THEN RETURN //if this.TextColor <> colour_on then // this.TextColor = colour_on // if ifonraise=1 then // this.Border=true // this.BorderStyle=StyleRaised! // end if //else // this.TextColor = colour_leave // this.Border=false //end if // IF ib_mousein THEN SetCapture(Handle(THIS)) THIS.TextColor = colour_on THIS.Underline = TRUE ELSE ReleaseCapture() THIS.TextColor = colour_leave THIS.Underline = FALSE END IF ib_mousein = NOT ib_mousein end event event key;If key = KeyEnter! Then // this.triggerevent(clicked!) End If end event event constructor;colour_on=RGB(55,155,255) //默认鼠标在的颜色 colour_leave=RGB(0,0,0) //默认鼠标不在的颜色 ifonraise=1 //默认鼠标在是突出 end event event clicked;this.TextColor = colour_leave THIS.Underline = FALSE ib_mousein = NOT ib_mousein //this.Border=true //this.BorderStyle=Stylelowered! end event on uo_text_m_main.create end on on uo_text_m_main.destroy end on