if i have created a splash screen, how can i make it disappear after loading?
Printable View
if i have created a splash screen, how can i make it disappear after loading?
Do you mean fade away, or just dissapear?
ermm
fade away
This is supposed to only work with Windows 2000 or later.
VB Code:
Const LWA_ALPHA = &H2 Const GWL_EXSTYLE = (-20) Const WS_EX_LAYERED = &H80000 Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long Private Declare Function SetLayeredWindowAttributes Lib "user32" (ByVal hWnd As Long, ByVal crKey As Long, ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long Private Sub FadeWindow(Percentage As Integer) SetLayeredWindowAttributes Me.hWnd, 0, 255 - (2.55 * Percentage), LWA_ALPHA End Sub Private Sub Form_Unload(Cancel As Integer) Dim x As Integer 'So we can change the alpha of the window SetWindowLong Me.hWnd, GWL_EXSTYLE, GetWindowLong(Me.hWnd, GWL_EXSTYLE) Or WS_EX_LAYERED For x = 0 To 100 'So the program doesn't stop responding DoEvents 'Fade the window FadeWindow x Next End Sub
ermmm
sorry i am not good at such stuff
but where to change ur code with respect to the splash screen i have?
andrew G
can u make a sample program and zip it for me to download and test?
thanks
Ok Try this. All i basically did was copy and paste the code straight into the splash screen's declarations.