Date: 02-16-2022
Return to Index
created by gbSnippets
'Controls on a transparent dialog are also transparent. They
'will respond as normal (press the button to see this).
'Compilable Example: (Jose Includes)
#Compiler PBWin 9, PBWin 10
#Compile EXE
#Dim All
%Unicode=1
#Include "Win32API.inc"
Global hDlg as Dword
Function PBMain() As Long
Dialog New Pixels, 0, "Layered Window",300,300,200,100, %WS_OverlappedWindow, %WS_Ex_Layered To hDlg
Control Add Button, hDlg, 500, "Push", 20,20,50,50
Dialog Show Modal hDlg Call DlgProc
End Function
CallBack Function DlgProc() As Long
Select Case Cb.Msg
Case %WM_InitDialog
SetLayeredWindowAttributes(hDlg, 0, 160, %LWA_ALPHA)
Case %WM_Command
If Cb.Ctl Then ? "I'm Alive!"
End Select
End Function
'gbs_00703
'Date: 03-10-2012
http://www.garybeene.com/sw/gbsnippets.htm