*created on 2 of October 2018 *the code draws a simple colored border with the vfp function Box() *this is a solution to simulate a grid border (native border is vfp system window border and don't have any property to change borderWidth,Bordercolor). PUBLIC oform oform1=NEWOBJECT("ygrid_border_color") oform1.Show read events RETURN * DEFINE CLASS ygrid_border_color AS form Height = 296+40 Width = 700 ShowWindow = 2 AutoCenter = .T. showtips=.T. scalemode=3 Caption = "draw a simple border on the grid.can resize the form/grid" Name = "Form1" ADD OBJECT grid1 AS grid WITH ; Anchor = 15, ; Height =310, ; Left =10, ; Top = 10, ; Width = 670, ; Name = "Grid1" PROCEDURE grid1.Init WITH this .recordsource="ycurs" .recordsourcetype=1 .deletemark=.F. .recordmark=.F. .highlightStyle=2 .gridlines=0 .fontsize=11 .fontname="Courier new" .SetAll("DynamicBackColor", "IIF(MOD(RECNO(), 2) = 0, RGB(255, 255, 255), RGB(255, 255, 190) )","column") .refresh endwith ENDPROC PROCEDURE resize &&draw a simple rectangle bounding the grid with any choosen color thisform.cls thisform.forecolor=rgb(0,0,64) &&&getcolor() thisform.box(thisform.grid1.Left-1,thisform.grid1.Top-1,thisform.grid1.Left+2+thisform.grid1.Width,thisform.grid1.Top+2+thisform.grid1.Height) ENDPROC PROCEDURE Load Close Data All Sele * From Home(1)+"samples\data\customer" Into Cursor ycurs Readwrite Sele ycurs ENDPROC PROCEDURE Destroy clea events ENDPROC ENDDEFINE * *-- EndDefine: ygrid_border_coloryou can also draw a border with APIs (see winapi examples at https://github.com/VFPX/Win32API/blob/master/samples/sample_256.md (warning drawing erased if moved -put a timer or std winapi processing function to make it persistent).