Hi,
I have an application that take 6 second to load and then to appear on the screen
(in the 6 second you can see the form but he look like stuck and after 6 second
it is working properly).
I want to do a progress bar while the application is loading.
So I thought maybe to make another form(form2) with a progress bar and to load
the first form (form1) while the progress bar fill in ( in form2).
but I didn't find how can I just load form1 without show him
I be glad to hear other ideas if you have
Best Regards,
Yaniv

how can I just load form1 without show him from other form(form2)?
Euclidez
it just end the progress bar and then do notthing... but you can see that the debugger still running
Glenn Ramsey
you should do:
Me.Hide()
Form2.ShowDialog()
Me.Show()
Uncle Ted
well once the progress bar has finished, CLOSE the progress bar form, which will then close the form and return back to form1.
Me.Hide()
Form2.ShowDialog()
Me.Show()
Progress bar form, when progress is finished:
Me.Close()
schewardnadse
with :
Me.Hide()
Form2.ShowDialog()
Me.Show()
it is open the form2(progress bar) when the progress bar end
he doesn't continue with form1...
and with :
Me.Hide()
Form2.Show()
Me.Show()
it is the same as before after the progress bar end he continue with FORM1
any more ideas
Yaniv
DSent
just don't Show the form. Instantiate it but don't call the Show() method until you are finished with your progress form
you are best to create form1 as a progress form, then form 2 as what the original form1 was....
however, since form1 is the one running first, you should hide() the form, then show the progress form, once done, then close the progress form and show() the form1
R0nda
Public
Class Form1 ' With form1 being the slow to load form and ' form2 having a progress bar set to maximum 10000 Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LoadForm2.Show()
Form2.BringToFront()
For x As Integer = 1 To 10000RichTextBox1.Text = RichTextBox1.Text &
"a"Form2.ProgressBar1.Increment(1)
Application.DoEvents()
NextForm2.Close()
End SubEnd
ClassPooja Katiyar
doesn't work...
I have form1 the main program ( that take a while untill it show)
and form2 with the progress bar.
Private
Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.LoadHide()
Form2.Show()
......
.... 'A lot of command lines....
......
End Subin this way it wait tell form2 end (the progress bar fill in) and then continue...
So is the same thing that I stuck before....
Regards,
Yaniv
CalifGirl