Funk Up Your Forms with Fading

Funk Up Your Forms with Fading

I find this particularly useful in an MDI environment where you don’t want to keep switching forms to read information?just make the front form transparent to read the one behind, then fade it in again. Much nicer than Alt+Tab!! Can also be used when quitting programs for a bit of extra class (no pun intended…)

Create a form with two buttons?btnFadeIn & btnFadeOut and execute theappropriate function.

Drop in the following code:

---------------------------Private Function FadeIn()   ' attach to BtnFadeIn_Click   Dim start, finish As Double   Dim i As Integer   i = 1   start = Microsoft.VisualBasic.DateAndTime.Timer   finish = start + 2.0   Do While Microsoft.VisualBasic.DateAndTime.Timer < finish       If Me.Opacity < 1.0 Then           Me.Opacity = ((i * 1) / 100)           i = i + 1       Else           Exit Do       End If   LoopEnd FunctionPrivate Function FadeOut()   ' attach to BtnFadeOut_Click - also Form1_Closing   Dim start, finish As Double   Dim i As Integer   i = 1   start = Microsoft.VisualBasic.DateAndTime.Timer   finish = start + 1.0   Do While Microsoft.VisualBasic.DateAndTime.Timer < finish       If Me.Opacity > 0.25 Then           Me.Opacity = ((100 - (i * 1)) / 100)           i = i + 1       Else           Exit Do       End If   LoopEnd Function
Share the Post:
Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular

XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across

AI innovation

Companies Leading AI Innovation in 2023

Artificial intelligence (AI) has been transforming industries and revolutionizing business operations. AI’s potential to enhance efficiency and productivity has become crucial to many businesses. As we move into 2023, several