Click here to Skip to main content
15,881,089 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Can I know to design a Avast loading animation, because I really like to use it on my own application. Like this -> https://pasteboard.co/JUHbFCH.gif[^] but in Avast-like UI. (VB.NET or C#)

What I have tried:

I tried to do this in a normal progress bar.
VB
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Timer1.Interval = 50
    End Sub
    Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
A:
        Progressbar1.Righttoleftlayout = false
        If ProgressBar1.Value <= 99 Then
            ProgressBar1.Value = ProgressBar1.Value + 1
        Else
            GoTo B
        End If
B:
        Progressbar1.Righttoleftlayout = True
        If ProgressBar1.Value > 0 Then
            ProgressBar1.Value = ProgressBar1.Value - 1
        Else
            GoTo A
        End If
    End Sub

Note: This is what I remember, I just installed a brand new windows installation. So I don't have the file.
Posted
Updated 28-Mar-21 10:45am
v4

1 solution

There is a property on the ProgressBar control, called Style. Set it to ProgressBarStyle.Marquee. No other code required.
 
Share this answer
 
Comments
Inter_Offical 28-Mar-21 21:04pm    
I Think that's not right, what I mean is like, try to install Avast free antivirus or any Avast products. You see when it is loading you see that it go left and right. But marquee can only go one direction. Like if I just created a new progress bar and set the style to marquee, it will just go left and it will loop. Anyways, thanks for the suggestion! :-)
Dave Kreskowiak 28-Mar-21 21:23pm    
OK, so you're going to have to create you own control. The ProgressBar control will not do what you want.

You're not going to get such a massive tutorial in any forum like this. Google for "vb.net create custom control tutorial" for such. Once you understand the basics, and how to render your control, you can tackle this control.

Inter_Offical 28-Mar-21 23:34pm    
Thanks! :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900