InitFrame(chat,4,Colors.Transparent,Colors.Gray)
-------------------
Sub InitFrame(pnl As Panel,BorderWidth As Float,FillColor As Int,BorderColor As Int)
Dim Rec As Rect
Dim Canvas1 As Canvas
Dim BorderWidth_2 As Float
BorderWidth_2=BorderWidth/2
Rec.Initialize(BorderWidth_2,BorderWidth_2,pnl.Width-BorderWidth_2,pnl.Height-BorderWidth_2)
Canvas1.Initialize(pnl)
Canvas1.DrawRect(Rec,FillColor,True,FillColor)
Canvas1.DrawRect(Rec,BorderColor,False,BorderWidth)
End Sub