Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
This code fades the form away when the user closes...
Author:
Peter Riley
E-mail:
Click to e-mail author
Submitted:
12/15/2000
Version:
VB5
Compatibility:
VB5, VB6
Category:
Forms
Views:
15757
This code fades the form away when the user closes it.
Declarations:
'none
Code:
Private Sub Command1_Click() FadeScreen Me, "tl" End Sub Sub FadeScreen(frm As Form, strWhichWay As String) Dim sngVertSize As Single Dim sngHorSize As Single Dim sngMoveRight As Single Dim sngMoveTop As Single Dim i As Integer Const cstStep = 100 sngVertSize = frm.Width / cstStep Select Case UCase(strWhichWay) Case "TR" ' 'fade to top right ' sngMoveRight = frm.Height / cstStep sngHorSize = sngMoveRight Case "BL" ' 'fade to bottom left ' sngMoveTop = frm.Height / cstStep sngVertSize = sngMoveTop sngHorSize = frm.Height / cstStep Case "BR" ' 'fade to bottom right ' sngMoveTop = frm.Height / cstStep sngVertSize = sngMoveTop sngMoveRight = frm.Height / cstStep sngHorSize = frm.Height / cstStep Case Else ' 'default to top left if you put something else in ' sngHorSize = frm.Height / cstStep 'size of horizontal steps End Select For i = 1 To cstStep - 1 frm.Move frm.Left + sngMoveRight, frm.Top + sngMoveTop, _ frm.Width - sngHorSize, frm.Height - sngVertSize Next Unload Me End Sub
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2023 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement