this was an old joke. IT played YMCA village people and said You've got Male! then jumped up and down to the music.
Code: Select all
#WindowLength=180
#WindowHeight=90
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 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
EndProcedure
Procedure.l CreatePopupMessage(con.s,time.s,ip.s,in.f,out.f)
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, 90, "connected as " + con + #CRLF$ + "since " + time + #CRLF$ + "IP address " + ip + #CRLF$ + StrF(in,2)+ " KB " + "Out " + StrF(out,2))
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("admin","10:00 (58s)","10.66.5.10",12.59,20.69)
; DataSection
;
; Music: IncludeBinary "c:\msg.ogg"
;
; EndDataSection