Option Explicit
Private Declare Function AnimateWindow Lib "user32" (ByVal hwnd As Long, ByVal dwTime As Long, ByVal dwFlags As Long) As Boolean
Private Sub Form_Load()
On Error GoTo starterr
Dim StartUpEffect
If frmOptions.optLR.Value Then
StartUpEffect = &H1
ElseIf frmOptions.optRL.Value Then
StartUpEffect = &H2
ElseIf frmOptions.optTB.Value Then
StartUpEffect = &H4
ElseIf frmOptions.optBT.Value Then
StartUpEffect = &H8
ElseIf frmOptions.optC.Value Then
StartUpEffect = &H10
Else
StartUpEffect = &H80000
End If
If Trim(frmOptions.Text1.Text) <> "" Then
AnimateWindow Me.hwnd, frmOptions.Text1.Text, StartUpEffect
DoEvents
Me.Refresh
Else
MsgBox = MsgBox("Please enter a valid number!", , "Error")
End If
Exit Sub
starterr:
MsgBox = MsgBox("Please select an effect!", , "Error")
End Sub