Ich habe dort das gefunden:
Code: Alles auswählen
; Original code by Danilo and Num3 (thanks, guys).
; Modified by PB to get a transparent TextGadget.
Global TextGadgetBackground,TextGadgetForeground
TextGadgetBackground=GetStockObject_(#HOLLOW_BRUSH)
TextGadgetForeground=RGB($FF,$00,$00)
Procedure WinProc(hWnd,Msg,wParam,lParam)
If Msg=#WM_CTLCOLORSTATIC And lParam=GadgetID(0)
SetBkMode_(wParam,#TRANSPARENT)
SetTextColor_(wParam,TextGadgetForeground)
ProcedureReturn TextGadgetBackground
Else
ProcedureReturn #PB_ProcessPureBasicEvents
EndIf
EndProcedure
OpenWindow(0,0,0,250,100,#PB_Window_SystemMenu|#PB_Window_ScreenCentered,"test")
SetWindowCallback(@WinProc()) : CreateGadgetList(WindowID())
TextGadget(0,0,0,225,13,"This TextGadget has a transparent background")
r=LoadImage(1,"Babe.bmp") : ImageGadget(1,0,0,0,0,r)
Repeat : Until WaitWindowEvent()=#PB_EventCloseWindow
DeleteObject_(TextGadgetBackground) 
