|
-
Jun 27th, 2002, 11:30 AM
#1
Thread Starter
Fanatic Member
Unload a Form
Does anyone know an API to make a form look like "EXPLOTE" when is unload?
-
Jun 27th, 2002, 11:36 AM
#2
-
Jun 27th, 2002, 11:41 AM
#3
Thread Starter
Fanatic Member
Sorry i was thinking in spanish. I mean: MAKE EXPLOTION or disapear
-
Jun 27th, 2002, 11:45 AM
#4
This doesn't explode, but the form folds up on itself 4 different ways
VB Code:
'Place this in the declarations section of the Form
'Replace FormName with the Key that you want the registry
'Settings stored under
Private Sub FadeScreen(TheForm As Form, WhichWay As String)
Dim TheVerticalSize As Single
Dim TheHorizontalSize As Single
Dim MoveMeToTheRight As Single
Dim MoveMyTop As Single
Dim i As Integer
Const TheStep = 1000
TheVerticalSize = TheForm.Width / TheStep
Select Case UCase(WhichWay)
Case "TR"
'fade to top right '
MoveMeToTheRight = TheForm.Height / TheStep
TheHorizontalSize = MoveMeToTheRight
Case "BL"
'fade to bottom left
MoveMyTop = TheForm.Height / TheStep
TheVerticalSize = MoveMyTop
TheHorizontalSize = TheForm.Height / TheStep
Case "BR"
'fade to bottom right
MoveMyTop = TheForm.Height / TheStep
TheVerticalSize = MoveMyTop
MoveMeToTheRight = TheForm.Height / TheStep
TheHorizontalSize = TheForm.Height / TheStep
Case Else
'default to top left if you put something else in
TheHorizontalSize = TheForm.Height / TheStep 'size of horizontal steps
End Select
SaveSetting "FormName", "Unload Screen", "Direction", WhichWay
For i = 1 To TheStep - 1
TheForm.Move TheForm.Left + MoveMeToTheRight, TheForm.Top + MoveMyTop, _
TheForm.Width - TheHorizontalSize, TheForm.Height - TheVerticalSize
Next
Unload Me
End Sub
Private Sub Form_Unload(Cancel As Integer)
Dim Regsetting As String
Dim NewDirection As String
Regsetting = GetSetting("FormName", "Unload Screen", "Direction")
If Regsetting = "" Then
FadeScreen Me, "BR"
Exit Sub
Else
Select Case Regsetting
Case "BR"
NewDirection = "BL"
Case "BL"
NewDirection = "TR"
Case "TR"
NewDirection = "BR"
End Select
End If
FadeScreen Me, NewDirection
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|