This version doesn't give the duplicate window. As soon as you attempt to move the window, it becomes non-responsive and the controls (ProgressBar and TextBox) stop updating. I will provide a version that does ghost shortly. I believe there's an additional "Update" that causes the duplicate.
Option Compare Text
Public Class GenBootlegTxts
Public foldersProcessedCount As Int64
Private Sub GenBootlegTxts_Load(sender As Object, e As EventArgs) Handles MyBase.Load
ProgressBar.Minimum = 0
ProgressBar.Maximum = 1000
ProgressBar.Step = 25
ProgressMinimum.Text = "0"
ProgressMinimum.Update()
Dim tNum As Int64 = 1000
ProgressMaximum.Text = tNum.ToString("#,#")
ProgressMaximum.Update()
End Sub
Sub GenTxtsButton_Click(sender As Object, e As EventArgs) Handles GenTxtsButton.Click
NextLevel()
End Sub
Private Sub NextLevel()
foldersProcessedCount += 1
Do While True
foldersProcessedCount += 1
If foldersProcessedCount Mod 25 = 0 Then
UpdateProcessingProgress(foldersProcessedCount)
End If
Loop
End Sub
Private Sub UpdateProcessingProgress(count As Int64)
If count >= ProgressBar.Maximum * 0.85 Then
ProgressBar.Maximum += ProgressBar.Maximum
ProgressMaximum.Text = ProgressBar.Maximum.ToString("#,#")
ProgressMaximum.Update()
End If
ProgressBar.PerformStep()
ProgressTextBox.Text = "# processed: " & foldersProcessedCount
ProgressTextBox.Update()
End Sub