That's a nice attempt, but that method doesn't really work, because it will always fill the inside of the box, and if you're drawing on a background that isn't black then it will become apparent.
I wrote a little box-drawing demo just now, you can take a look at it, maybe you'll learn a bit

:
Set Display Mode Desktop Width(), Desktop Height(), 32
Sync On : Sync Rate 60
Set Text Font "Microsoft Sans Serif" : Set Text Size 24
Randomize Timer()
Cls 0xFFFFFF
Do
Ink 0
If SpaceKey()
X = Rnd(Desktop Width() - 300)
Y = Rnd(Desktop Height() - 300)
LineBox(X, Y, X + Rnd(300), Y + Rnd(300), Rnd(0xFFFFFF))
EndIf
If ReturnKey()
X = Rnd(Desktop Width() - 300)
Y = Rnd(Desktop Height() - 300)
Thick = Rnd(20) + 3
LineBox2(X, Y, X + Rnd(200) + 100, Y + Rnd(200) + 100, Thick, Rnd(0xFFFFFF))
EndIf
If ShiftKey()
X = Rnd(Desktop Width() - 300)
Y = Rnd(Desktop Height() - 300)
LineBoxFill(X, Y, X + Rnd(300), Y + Rnd(300), Rnd(0xFFFFFF), Rnd(0xFFFFFF))
EndIf
If ControlKey()
X = Rnd(Desktop Width() - 300)
Y = Rnd(Desktop Height() - 300)
Thick = Rnd(20) + 3
LineBox2Fill(X, Y, X + Rnd(200) + 100, Y + Rnd(200) + 100, Thick, Rnd(0xFFFFFF), Rnd(0xFFFFFF))
EndIf
LineBoxFill(5, 5, 545, 132, 0, RGB(0, 150, 250))
Text 10, 10, "Press the spacekey to draw line boxes with LineBox()."
Text 10, 38, "Press the enterkey to draw line boxes with LineBox2()."
Text 10, 66, "Press the shiftkey to draw filled line boxes with LineBoxFill()."
Text 10, 94, "Press the controlkey to draw filled line boxes with LineBox2Fill()."
Sync
Loop
Function LineBox(X1, Y1, X2, Y2, Col)
Ink Col
Line X1, Y1, X2, Y1
Line X1, Y1, X1, Y2
Line X2, Y1, X2, Y2
Line X1, Y2, X2, Y2
EndFunction
Function LineBox2(X1, Y1, X2, Y2, Thickness, Col)
Ink Col
Box X1 - (Thickness / 2), Y1 - (Thickness / 2), X2 + (Thickness / 2), Y1 + (Thickness / 2)
Box X1 - (Thickness / 2), Y1 - (Thickness / 2), X1 + (Thickness / 2), Y2 + (Thickness / 2)
Box X2 - (Thickness / 2), Y1 - (Thickness / 2), X2 + (Thickness / 2), Y2 + (Thickness / 2)
Box X1 - (Thickness / 2), Y2 - (Thickness / 2), X2 + (Thickness / 2), Y2 + (Thickness / 2)
EndFunction
Function LineBoxFill(X1, Y1, X2, Y2, LineCol, FillCol)
Ink FillCol
Box X1, Y1, X2, Y2
LineBox(X1, Y1, X2, Y2, LineCol)
EndFunction
Function LineBox2Fill(X1, Y1, X2, Y2, Thickness, LineCol, FillCol)
Ink FillCol
Box X1, Y1, X2, Y2
LineBox2(X1, Y1, X2, Y2, Thickness, LineCol)
EndFunction
LineBox() draws a non-filled, line-only box.
LineBox2() does the same, but the line can have a thickness.
LineBoxFill() is the same as LineBox() but you can specify a fill color.
LineBox2Fill() is the same as LineBoxFill() but you can specify a line thickness.