Restored from previous forum. Originally posted by Franco. ; (c) 2001 - Franco's template - absolutely freeware
; Elliptic Splash/Intro Window
; Improved Version
Code:
Procedure SplashElliptic(SizeX,SizeY,BMP$,Time)
InitGadget(0)
If LoadImage(0, BMP$)
If OpenWindow(0, GetSystemMetrics_(#SM_CXSCREEN), GetSystemMetrics_(#SM_CYSCREEN), SizeX, SizeY, #WS_POPUP, "Test Intro")
If CreateGadgetList(WindowID())
SetForegroundWindow_(WindowID())
SetWindowPos_(WindowID(),#HWND_TOPMOST,(GetSystemMetrics_(#SM_CXSCREEN)/2)-(WindowWidth()/2),(GetSystemMetrics_(#SM_CYSCREEN)/2)-(WindowHeight()/2),SizeX,SizeY, SWP_NOMOVE)
ImageGadget(0, ((SizeX)/2)-(ImageWidth()/2), ((SizeY)/2)-(ImageHeight()/2), 0, 0, UseImage(0))
Elliptic.l=CreateEllipticRgn_(0,0,SizeX,SizeY)
SetWindowRgn_(WindowID(),Elliptic,1)
WindowEvent() : WindowEvent() ; Thanks to Mr.Skunk :)
Delay(Time)
DeleteObject_(Elliptic)
CloseWindow(0)
ProcedureReturn 1
EndIf
EndIf
Else
ProcedureReturn 0
EndIf
EndProcedure
If SplashElliptic(220,130,"Data\Bullet_1.bmp",3000)
Else : MessageRequester("Error","No Splash Window",0)
EndIf
If OpenWindow(0, GetSystemMetrics_(#SM_CXSCREEN), GetSystemMetrics_(#SM_CYSCREEN), 320, 240, #PB_Window_SystemMenu, "Test Intro")
SetWindowPos_(WindowID(),#HWND_TOPMOST,(GetSystemMetrics_(#SM_CXSCREEN)/2)-(WindowWidth()/2),(GetSystemMetrics_(#SM_CYSCREEN)/2)-(WindowHeight()/2),320,240, 0 )
Repeat
EventID = WaitWindowEvent()
Until EventID = #PB_EventCloseWindow
EndIf
End
Have a nice day...
Franco
Edited by - Franco on 18 October 2001 23:16:26