I have created on Data Extractor application in Visual Studio 2019(VB.NET) which is scheduled to extract data from Access DB(updating by other software) file and convert to Text file in every 2 seconds. Meanwhile it also updates many controls of the form such as chart control, Progress Bar and Text box. I have published My application on .NET Framework 4.7.2
Issue: Application is working Completely fine for almost an hour after initiation but its control started to fade and ultimately disappear after some time(As you can see in the image). Eventually it stopped responding and I have to close and reopen.
Ironically When I checked My text file during application under Hang condition, it was continuously updating with data from DB file. I suspected that code is performing its duty but Windows Form loses its aesthetics over the time. Why it is happening?
what could be the possible reason of occurrence? (I tried to clean the solution and built it again but gain no success)
I used CircularPeogressBar from https://github.com/RamsinChaabian/CircleProgressBar
Below is code from designer window
'CircularProgressBar1
'
Me.CircularProgressBar1.AccessibleRole = System.Windows.Forms.AccessibleRole.None
Me.CircularProgressBar1.AnimationFunction = WinFormAnimation.KnownAnimationFunctions.Liner
Me.CircularProgressBar1.AnimationSpeed = 0
Me.CircularProgressBar1.BackColor = System.Drawing.Color.Transparent
Me.CircularProgressBar1.Font = New System.Drawing.Font("Microsoft Sans Serif", 72.0!, System.Drawing.FontStyle.Bold)
Me.CircularProgressBar1.ForeColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
Me.CircularProgressBar1.InnerColor = System.Drawing.Color.Transparent
Me.CircularProgressBar1.InnerMargin = 2
Me.CircularProgressBar1.InnerWidth = -1
Me.CircularProgressBar1.Location = New System.Drawing.Point(313, 132)
Me.CircularProgressBar1.MarqueeAnimationSpeed = 0
Me.CircularProgressBar1.Maximum = 60
Me.CircularProgressBar1.Name = "CircularProgressBar1"
Me.CircularProgressBar1.OuterColor = System.Drawing.Color.FromArgb(CType(CType(87, Byte), Integer), CType(CType(87, Byte), Integer), CType(CType(87, Byte), Integer))
Me.CircularProgressBar1.OuterMargin = -25
Me.CircularProgressBar1.OuterWidth = 25
Me.CircularProgressBar1.ProgressColor = System.Drawing.Color.Cyan
Me.CircularProgressBar1.ProgressWidth = 20
Me.CircularProgressBar1.SecondaryFont = New System.Drawing.Font("Microsoft Sans Serif", 36.0!)
Me.CircularProgressBar1.Size = New System.Drawing.Size(156, 156)
Me.CircularProgressBar1.StartAngle = -90
Me.CircularProgressBar1.Step = 1
Me.CircularProgressBar1.SubscriptColor = System.Drawing.Color.Transparent
Me.CircularProgressBar1.SubscriptMargin = New System.Windows.Forms.Padding(10, -35, 0, 0)
Me.CircularProgressBar1.SubscriptText = ""
Me.CircularProgressBar1.SuperscriptColor = System.Drawing.Color.Transparent
Me.CircularProgressBar1.SuperscriptMargin = New System.Windows.Forms.Padding(10, 35, 0, 0)
Me.CircularProgressBar1.SuperscriptText = ""
Me.CircularProgressBar1.TabIndex = 24
Me.CircularProgressBar1.TextMargin = New System.Windows.Forms.Padding(8, 8, 0, 0)
- Do I have to code entire CircularProgressBar Control to get rid of this issue or is there a way out available to tackle this problem?
- If proper dispose is the issue then how we can dispose them efficiently without leaking graphics resources?