ich möchte den hintergrund eines ListIconGadgets transparent machen. Wie geht das? Die Boardsuche hat nichts ergeben...
Danke,
PureBasic4.0
//edit: Für den Button bräuchte ich es auch noch. Ich offe, dass ich euch hier nicht zu viele umstände mache

Code: Alles auswählen
;/ PB 4.x
If OpenWindow(0, xWin, yWin, 615, 433, "Blubb", #PB_Window_SystemMenu|#PB_Window_TitleBar|#PB_Window_MinimizeGadget) And CreateGadgetList(WindowID(0))
SetWindowLong_(WindowID(0),#GWL_EXSTYLE,GetWindowLong_(WindowID(0),#GWL_EXSTYLE)|524288)
SetLayeredWindowAttributes_(WindowID(0),RGB(255,0,255),0,1)
StickyWindow(0, 1)
ListIconGadget(0, 157, 58, 294, 294, "Hallo",100,#PB_ListIcon_GridLines)
SetGadgetColor(0,#PB_Gadget_BackColor,RGB(255,0,255))
;{- Main Loop
Repeat
Event = WaitWindowEvent() ; Zuverlässigkeit bei Mausbewegung!
Until Event=16
EndIf
Code: Alles auswählen
OpenWindow(0,0,0,400,300,"untitled",#WS_OVERLAPPEDWINDOW | 1)
CreateGadgetList(WindowID(0))
;/ Gadgets
ButtonGadget(0,100,100,100,20,"MausX")
;/
osi.OSVERSIONINFO
osi\dwOSVersionInfoSize = SizeOf(OSVERSIONINFO)
GetVersionEx_(osi)
If osi\dwPlatformId = #VER_PLATFORM_WIN32_NT
SetWindowLong_(WindowID(0),#GWL_EXSTYLE,#WS_EX_LAYERED)
SetLayeredWindowAttributes_(WindowID(0),0,120,#LWA_ALPHA)
EndIf
While WaitWindowEvent() ! 16
Wend
Code: Alles auswählen
If OpenWindow(0, 0, 0, 615, 433, "Blubb", #PB_Window_SystemMenu|#PB_Window_TitleBar|#PB_Window_MinimizeGadget)
CreateImage(0,600,400)
StartDrawing(ImageOutput(0))
Circle(100,100,40,RGB(255,0,0))
StopDrawing()
CreateGadgetList(WindowID(0))
ImageGadget(1,0,0,600,400,ImageID(0))
OpenWindow(1,WindowX(0)+5, WindowY(0)+50, 300, 300, "Blubb", #PB_Window_BorderLess,WindowID(0))
CreateGadgetList(WindowID(1))
SetWindowLong_(WindowID(1),#GWL_EXSTYLE,GetWindowLong_(WindowID(0),#GWL_EXSTYLE)|524288)
SetLayeredWindowAttributes_(WindowID(1),RGB(255,0,255),0,1)
StickyWindow(0, 1)
ListIconGadget(0, 0, 0, 300, 300, "Hallo",100,#PB_ListIcon_GridLines)
SetGadgetColor(0,#PB_Gadget_BackColor,RGB(255,0,255))
;{- Main Loop
Repeat
Event = WaitWindowEvent() ; Zuverlässigkeit bei Mausbewegung!
IF Event=#PB_Event_SizeWindow or Event=#PB_Event_MoveWindow
ResizeWindow(1,WindowX(0)+5,WindowY(0)+50,#PB_Ignore,#PB_Ignore)
EndIf
Until Event=16
EndIf
Code: Alles auswählen
If OpenWindow(0, 0, 0, 615, 433, "Blubb", #PB_Window_SystemMenu|#PB_Window_TitleBar|#PB_Window_MinimizeGadget)
CreateImage(0,600,400)
StartDrawing(ImageOutput(0))
Circle(100,100,40,RGB(255,0,0))
StopDrawing()
CreateGadgetList(WindowID(0))
ImageGadget(0,0,0,600,400,ImageID(0))
ContainerGadget(1,WindowX(0)+5, WindowY(0)+50, 300, 300,#PB_Container_BorderLess)
SetWindowLong_(GadgetID(1),#GWL_EXSTYLE,GetWindowLong_(WindowID(0),#GWL_EXSTYLE)|524288)
SetLayeredWindowAttributes_(GadgetID(1),RGB(255,0,255),0,1)
ListIconGadget(2, 0, 0, 300, 300, "Hallo",100,#PB_ListIcon_GridLines)
CloseGadgetList()
SetGadgetColor(2,#PB_Gadget_BackColor,RGB(255,0,255))
StickyWindow(0, 1)
;{- Main Loop
Repeat
Event = WaitWindowEvent() ; Zuverlässigkeit bei Mausbewegung!
IF Event=#PB_Event_SizeWindow or Event=#PB_Event_MoveWindow
;ResizeWindow(1,WindowX(0)+5,WindowY(0)+50,#PB_Ignore,#PB_Ignore)
EndIf
Until Event=16
EndIf