Results 1 to 4 of 4

Thread: Unload a Form

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Santo Domingo,D.N., Dom. Rep.
    Posts
    707

    Talking Unload a Form

    Does anyone know an API to make a form look like "EXPLOTE" when is unload?

  2. #2
    spetnik
    Guest
    What is explote?

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Santo Domingo,D.N., Dom. Rep.
    Posts
    707
    Sorry i was thinking in spanish. I mean: MAKE EXPLOTION or disapear

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    This doesn't explode, but the form folds up on itself 4 different ways
    VB Code:
    1. 'Place this in the declarations section of the Form
    2. 'Replace FormName with the Key that you want the registry
    3. 'Settings stored under
    4. Private Sub FadeScreen(TheForm As Form, WhichWay As String)
    5.        
    6.         Dim TheVerticalSize As Single
    7.         Dim TheHorizontalSize As Single
    8.         Dim MoveMeToTheRight As Single
    9.         Dim MoveMyTop As Single
    10.         Dim i As Integer
    11.         Const TheStep = 1000
    12.        
    13.         TheVerticalSize = TheForm.Width / TheStep
    14.        
    15.         Select Case UCase(WhichWay)
    16.           Case "TR"
    17.             'fade to top right                '
    18.             MoveMeToTheRight = TheForm.Height / TheStep
    19.             TheHorizontalSize = MoveMeToTheRight
    20.           Case "BL"
    21.             'fade to bottom left
    22.             MoveMyTop = TheForm.Height / TheStep
    23.             TheVerticalSize = MoveMyTop
    24.             TheHorizontalSize = TheForm.Height / TheStep
    25.           Case "BR"
    26.             'fade to bottom right
    27.             MoveMyTop = TheForm.Height / TheStep
    28.             TheVerticalSize = MoveMyTop
    29.             MoveMeToTheRight = TheForm.Height / TheStep
    30.             TheHorizontalSize = TheForm.Height / TheStep
    31.           Case Else
    32.             'default to top left if you put something else in
    33.             TheHorizontalSize = TheForm.Height / TheStep 'size of horizontal steps
    34.         End Select
    35.        SaveSetting "FormName", "Unload Screen", "Direction", WhichWay
    36.         For i = 1 To TheStep - 1
    37.             TheForm.Move TheForm.Left + MoveMeToTheRight, TheForm.Top + MoveMyTop, _
    38.             TheForm.Width - TheHorizontalSize, TheForm.Height - TheVerticalSize
    39.         Next
    40.        
    41.         Unload Me
    42.        
    43.     End Sub
    44.  
    45. Private Sub Form_Unload(Cancel As Integer)
    46. Dim Regsetting As String
    47. Dim NewDirection As String
    48. Regsetting = GetSetting("FormName", "Unload Screen", "Direction")
    49.         If Regsetting = "" Then
    50.            FadeScreen Me, "BR"
    51.            Exit Sub
    52.         Else
    53.           Select Case Regsetting
    54.             Case "BR"
    55.               NewDirection = "BL"
    56.             Case "BL"
    57.               NewDirection = "TR"
    58.             Case "TR"
    59.               NewDirection = "BR"
    60.           End Select
    61.         End If
    62.         FadeScreen Me, NewDirection
    63. 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
  •  



Click Here to Expand Forum to Full Width