
Maybe I must use WinAPI in this time







Code: Select all
dark = RGB(113,126,80)
light = RGB(237,229,190)
off = 35
CreateImage(0,582,582)
StartDrawing(ImageOutput(0))
  Box(0,0,582,582,light)
  For j = off To off+448 Step 128
    For i = 64 To 532 Step 128
      Box(i+off,j,64,64,dark)
      Box((i-64)+off,j+64,64,64,dark)
    Next
  Next
  DrawingMode(#PB_2DDrawing_Outlined)
  Box(off-1,off-1,514,514,dark)
  Box(off-6,off-6,524,524,dark)
  Box(off-10,off-10,532,532,dark)
  FillArea(off-9,off-9,dark,dark)
  Box(off-35,off-35,582,582,0)            
StopDrawing()
main = OpenWindow(0,0,0,582,582,"Alpha Background Test",$CF0001)
SetWindowLong_(main, #GWL_EXSTYLE, GetWindowLong_(main, #GWL_EXSTYLE) | #WS_EX_LAYERED )
SetLayeredWindowAttributes_(main, 0, 100, #LWA_ALPHA)
hBrush = CreatePatternBrush_(ImageID(0))
SetClassLong_(main,#GCL_HBRBACKGROUND,hBrush)
InvalidateRect_(main,0,1)
Repeat:Until WaitWindowEvent() = #WM_CLOSE


Code: Select all
    hWnd=WindowID(0)
    hImage=LoadImage(0,bgimage$)
    hImagelist=ImageList_Create_(400,300,#ILC_COLORDDB,1,0)
    ImageList_Add_(hImagelist,hImage,RGB(0,0,0))
    hDc=BeginPaint_(hWnd,@ptst)
    ImageList_Draw_(hImagelist,0,hDc,0,0,#ILD_BLEND)
    EndPaint_(hWnd,@ptst)