Code: Select all
ExamineDesktops()
Enumeration
#WIN
#Image1
#Image2
#BorderTop
#TranspCv1
#TranspCv2
#BorderBtm
#BorderLh
#BorderRh
#SplitterTop
#SplitterBtm
EndEnumeration
Procedure ShowWin()
;-------------------
If OpenWindow(#WIN, 0, 0, 400, 200, "Adjustable Hole",#PB_Window_SystemMenu | #PB_Window_TitleBar | #PB_Window_MinimizeGadget | #PB_Window_SizeGadget | #PB_Window_Invisible | #PB_Window_ScreenCentered)
SetWindowColor(#WIN,RGB(0,0,255))
SetWindowLongPtr_(WindowID(#WIN),#GWL_EXSTYLE,#WS_EX_LAYERED | #WS_EX_TOPMOST)
SetWindowPos_(WindowID(#WIN),#HWND_TOPMOST,0, 0, 0, 0, #SWP_NOMOVE | #SWP_NOSIZE)
SetLayeredWindowAttributes_(WindowID(#WIN),RGB(0,0,255),0,#LWA_COLORKEY)
CanvasGadget(#BorderTop, 0, 0, 0, 0)
CanvasGadget(#TranspCv1, 0, 0, 0, 0)
CanvasGadget(#TranspCv2, 0, 0, 0, 0)
CanvasGadget(#BorderBtm, 0, 0, 0, 0)
CanvasGadget(#BorderLh, 0, 0, 10, 200)
CanvasGadget(#BorderRh, 390, 0, 10, 200)
SplitterGadget(#SplitterTop, 10, 0, 380, 98, #BorderTop,#TranspCv1)
SplitterGadget(#SplitterBtm, 10, 104, 380, 98, #TranspCv2,#BorderBtm)
PureRESIZE_SetGadgetResize(#BorderLh, 1, 1, 0, 1)
PureRESIZE_SetGadgetResize(#BorderRh, 0, 1, 1, 1)
PureRESIZE_SetGadgetResize(#SplitterTop, 1, 1, 1, 1)
PureRESIZE_SetGadgetResize(#SplitterBtm, 1, 1, 1, 1)
WindowBounds(#WIN, 30, 200, #PB_Ignore, 200)
HideWindow(#WIN,#False)
EndIf
EndProcedure
Procedure WaitForUser()
;----------------------
Repeat
iEvent = WaitWindowEvent(1)
StartDrawing(CanvasOutput(#TranspCv1))
DrawingMode(#PB_2DDrawing_Default)
FillArea(10,10,1,RGB(0,0,255))
StopDrawing()
StartDrawing(CanvasOutput(#TranspCv2))
FillArea(10,10,1,RGB(0,0,255))
StopDrawing()
StartDrawing(CanvasOutput(#BorderTop))
FillArea(10,10,1,RGB(185,185,185))
StopDrawing()
StartDrawing(CanvasOutput(#BorderBtm))
FillArea(10,10,1,RGB(185,185,185))
StopDrawing()
StartDrawing(CanvasOutput(#BorderLh))
FillArea(1,1,1,RGB(185,185,185))
StopDrawing()
StartDrawing(CanvasOutput(#BorderRh))
FillArea(1,1,1,RGB(185,185,185))
StopDrawing()
Until iEvent = #PB_Event_CloseWindow
EndProcedure
ShowWin()
WaitForUser()
EndNote, the above code requires Gnozal's PureRESIZE lib. http://gnozal.ucoz.com/


