I´ve got a problem and cant solve it

I draw a normal box and an outlined box on a form.
Later, the normal box should contain a bitmap.
Then the user should mask a piece in it with the outline-box.
The mark (with mouse events) isn´t the problem.
The problem is, that the outline-box should have an animated color effect.
Perhaps black/white flashing or black/white lined.
Comparable with the mark in a (twain) scanwindow or an image editing soft.
Later, the bitmap out of the mark should lighten down a little bit.
How can i solve this? Can you help me, please?
Frank
Code: Select all
x1.l=50
x2.l=200
y1.l=50
y2.l=200
If OpenWindow(0,100,150,600,270,#PB_Window_SystemMenu,"Test")
CreateGadgetList(WindowID())
hWnd=ImageGadget(1,10,10,250,250,LoadImage(0,""))
CreateImage(0,250,250)
StartDrawing(ImageOutput())
Box(0,0,250,250,RGB(160,160,160))
FrontColor(0, 0, 0)
DrawingMode(1 | 4)
Box(x1, y1, x2-x1, y2-y1)
StopDrawing()
SetGadgetState(1,UseImage(0))
EndIf