Code: Select all
Procedure WinTransParentRegion(win,width,height)
outterRgn = CreateRectRgn_(0, 0, width, height)
innerRgn = CreateRectRgn_(0, 0, width, height)
winRgn = outterRgn
CombineRgn_(winRgn, outterRgn, innerRgn, #RGN_XOR)
SetWindowRgn_(WindowID(win), winRgn, 1)
DeleteObject_(outterRgn)
DeleteObject_(innerRgn)
EndProcedure
OpenWindow(3,0,0,50,50,"HiddenWindow",#PB_Window_Invisible)
hWnd2=OpenWindow(1, textPos, 0, 105, 20 , "",#PB_Window_BorderLess,WindowID(3))
SetWindowLong_(WindowID(1),#GWL_EXSTYLE,GetWindowLong_(WindowID(1),#GWL_EXSTYLE)|#WS_EX_LAYERED|#WS_EX_TOOLWINDOW)
WinTransParentRegion(1,105,1)
StartDrawing(WindowOutput(1))
;Locate(169,0)
;DrawingFont(UseFont(2))
oldtime=Date()-StartTime
time=ResultDate-StartTime
DrawText(0,0," Active "+FormatDate("%hh:%ii:%ss",time )+" ")
StopDrawing()