Code: Select all
#WindowLength=180
#WindowHeight=50
Global rect.RECT
Procedure ShowWindow(window)
HideWindow(Window, 0)
sy.l
sf.f = (1-#WindowLength) / (1-255)
sfy.f = (1-#WindowHeight) /(1-255)
PlaySound(0)
For i=0 To 255 Step 10
sX = (i * sf) - #WindowLength
MoveWindow_(WindowID(window),rect\right-#WindowLength-Sx,(rect\bottom-#WindowHeight)-Sy,#WindowLength,#WindowHeight,1)
SetLayeredWindowAttributes_(WindowID(window), 0, i, 2)
Delay(30)
Next
Delay(2000)
For c = 1 To 25
For a = 0 To 255 Step 10
sY = a * sfy
MoveWindow_(WindowID(window),rect\right-#WindowLength-Sx,(rect\bottom-#WindowHeight)-Sy,#WindowLength,#WindowHeight,1)
Delay(4)
Next
For d = 255 To 0 Step - 10
sY = d * sfy
MoveWindow_(WindowID(window),rect\right-#WindowLength-Sx,(rect\bottom-#WindowHeight)-Sy,#WindowLength,#WindowHeight,1)
Delay(4)
Next
Next
For i=255 To 0 Step -2
sX = (i * sf) - #WindowLength
MoveWindow_(WindowID(window),rect\right-#WindowLength-Sx,(rect\bottom-#WindowHeight)-Sy,#WindowLength,#WindowHeight,1)
SetLayeredWindowAttributes_(WindowID(window), 0, i, 2)
Delay(30)
Next
Delay(15000)
EndProcedure
Procedure.l CreatePopupMessage(*DeviceName.s)
Define Window.l, DummyWindow.l, i.l, TextGadget
SystemParametersInfo_(#SPI_GETWORKAREA,0,rect.RECT,0)
DummyWindow.l=OpenWindow(#PB_Any, 0, 0, 0, 0, "", #PB_Window_Invisible)
Window=OpenWindow(#PB_Any, rect\right-#WindowLength, rect\bottom-#WindowHeight, #WindowLength, #WindowHeight, "Audio Device", #WS_POPUPWINDOW|#WS_DISABLED|#PB_Window_Invisible, WindowID(DummyWindow))
SetWindowLong_(WindowID(window), #GWL_EXSTYLE,GetWindowLong_(WindowID(window),#GWL_EXSTYLE)|#WS_EX_LAYERED )
If Window
If CreateGadgetList(WindowID(Window))
TextGadget=TextGadget(#PB_Any, 10, 10, 160, 30, "You have male:"+Chr($0A)+*DeviceName)
SetGadgetColor(TextGadget,#PB_Gadget_BackColor,RGB(255,255,255))
EndIf
StickyWindow(Window, 1)
SetWindowColor(Window, RGB(255, 255, 255))
tid = CreateThread(@ShowWindow(),window)
EndIf
Repeat:
WaitWindowEvent(1)
Until Not IsThread(tid)
CloseWindow(Window)
CloseWindow(DummyWindow)
EndProcedure
InitSound()
UseOGGSoundDecoder()
len = CatchSound(0, ?Music,154116)
CreatePopupMessage(@"WTF!")
DataSection
Music: IncludeBinary "c:\msg.ogg"
EndDataSection