Members

Technology Zones

Articles

Hosted By

MaximumASP

Info

Rated
Read 24,558 times

Related Categories

Fading The Form

Antony Lees

This code shows you how to fade the form from black to light blue, but can be customised to any colour by using the RGB settings

'\\\\\\\\
Sub ColourFade(vForm As Form) 'Put this code into the form you wish to fade
   Dim intLoop As Integer
   vForm.DrawStyle = vbInsideSolid
   vForm.DrawMode = vbCopyPen
   vForm.ScaleMode = vbPixels
   vForm.DrawWidth = 2
   vForm.ScaleHeight = 256
   For intLoop = 0 To 255


'ATTENTION: This line you should change to a colour you want, RGB(0,500,255 - intLoop) makes the colour change from a florescent green to a vile turquiose!

   vForm.Line (0, intLoop)-(Screen.Width, intLoop - 1), RGB(0, 0, 255 - intLoop), B
   Next intLoop
End Sub

Private Sub Form_Activate()
ColourFade Me
End Sub
'////////

Comments

  • Fading Colors on Form

    Posted by sallu_shan on 29 Oct 2005

    Subject should be "Fading/Changing Colors on Form" :)
    Fading Form means making a form invisible while making it transparent slowly

  • Now do that in a checkbox

    Posted by sverreco on 12 Feb 2003

    How do I do that in a checkbox or with radiobuttons (colour-picker)

  • Eror!

    Posted by Sintsof on 28 Nov 2002

    Error Type:
    Microsoft VBScript compilation (0x800A03EE)
    Expected ')'
    /aaa.asp, line 10, column 22
    Sub ColourFade (vForm As Form)

    :(

  • Form redraw

    Posted by U1traDIMM on 02 Oct 2002

    Dont forget to set AutoReDraw = True!!!

    From Russia with LOVE:cool: :eek: :mad: :mad: :mad: :eek: :( :D :confused: