|
Nomainwin WindowWidth = 600 WindowHeight = 400 UpperLeftX = int((DisplayWidth-WindowWidth)/2) UpperLeftY = int((DisplayHeight-WindowHeight)/2) text$ = "This code was adapted from the Libby contest " + _ "entry, LB Window Spier, by John Richardson. " + _ "It will NOT work on Windows 98 or Windows 95." Statictext #transp.txt1, text$, 20, 20, 550, 200 Stylebits #transp, 0, 0, _WS_EX_LAYERED, 0 Open "Transparent Window" for Window as #transp #transp, "Trapclose EndDemo" #transp, "Font Verdana 12 Bold" hTransp = hWnd(#transp) Call SetTransparent hTransp Wait Sub EndDemo handle$ Close #handle$ End End Sub Sub SetTransparent handle CallDLL #user32, "GetSysColor", 15 as Long, buttonface as Long CallDLL #user32, "SetLayeredWindowAttributes", _ handle as Ulong, _ buttonface as Long, _ 0 as Long, _ _LWA_COLORKEY as Long, _ layer as Long End Sub