Transparent BackGround Editor Gadget (Windows)
Posted: Mon May 16, 2011 7:57 pm
Tested with PB 4.51 x86\x64 [Win 7 x64 - XP SP2 x86]
Code: Select all
If OpenWindow(0, 0, 0, 400, 300, "EditorGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
HideWindow(0,1)
OpenWindow(1, 0, 0,395, 200, "Transparent",#PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget |#PB_Window_ScreenCentered)
SetParent_(WindowID(0),WindowID(1))
EditorGadget(0, 10, 10, 375, 120)
For a = 0 To 5
AddGadgetItem(0, a, "Line "+Str(a))
Next
SetGadgetColor(0, #PB_Gadget_BackColor,$FFFFFE)
SetWindowLong_(WindowID(1),#GWL_EXSTYLE,GetWindowLong_(WindowID(1),#GWL_EXSTYLE)|#WS_EX_LAYERED)
SetLayeredWindowAttributes_(WindowID(1),$FFFFFE,0,#LWA_COLORKEY)
SetActiveWindow(1)
SetActiveGadget(0)
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf