Hi -
newbie question here I have a vb.net application made that during it's form load it will run external applications to using the process.start. Everything works great except I never get the form to display with the progress bar as it processes each external application. It will install all the external apps that it runs no problems but form never displays. Is there a way I can have the form display first and then process the external apps?
A Snippet of my code:
Any help is greatly appreciated, in the example above the code is in form load and it runs fine but I never see the form with the progress bar displayed. Thanks
newbie question here I have a vb.net application made that during it's form load it will run external applications to using the process.start. Everything works great except I never get the form to display with the progress bar as it processes each external application. It will install all the external apps that it runs no problems but form never displays. Is there a way I can have the form display first and then process the external apps?
A Snippet of my code:
VB.NET:
[size=2]
[/size][size=2][color=#0000ff]Dim[/color][/size][size=2] computername [/size][size=2][color=#0000ff]As[/color][/size][size=2] [/size][size=2][color=#0000ff]String
[/color][/size][size=2]computername = System.Net.Dns.GetHostName
[/size][size=2][color=#0000ff]Dim[/color][/size][size=2] oFile [/size][size=2][color=#0000ff]As[/color][/size][size=2] System.IO.File
[/size][size=2][color=#0000ff]Dim[/color][/size][size=2] oWrite [/size][size=2][color=#0000ff]As[/color][/size][size=2] System.IO.StreamWriter
[/size][size=2][color=#008000]' Start the Install
[/color][/size][size=2]ListBox1.Items.Add("Loaded....")
ListBox1.Items.Add(" ")
[/size][size=2][color=#008000]' ProgressBar1.Value = 10
[/color][/size][size=2][/size][size=2][color=#008000]' Start my Package Installation Here
[/color][/size][size=2][/size][size=2][color=#008000]
[/color][/size][size=2][/size][size=2][color=#0000ff]On[/color][/size][size=2] [/size][size=2][color=#0000ff]Error[/color][/size][size=2] [/size][size=2][color=#0000ff]Resume[/color][/size][size=2] [/size][size=2][color=#0000ff]Next
[/color][/size][size=2][/size][size=2][color=#0000ff]Dim[/color][/size][size=2] startpkg [/size][size=2][color=#0000ff]As[/color][/size][size=2] [/size][size=2][color=#0000ff]New[/color][/size][size=2] System.Diagnostics.Process
ListBox1.Items.Add("Processing Package: sample Files")
startpkg.StartInfo.FileName = "sample.exe"
startpkg.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
startpkg.Start()
startpkg.WaitForExit()
startpkg.Close()
oWrite = oFile.CreateText("C:\log.log")
oWrite.WriteLine("Processed Sample Files")
oWrite.WriteLine("")
ProgressBar1.Value = 20
[/size]
Any help is greatly appreciated, in the example above the code is in form load and it runs fine but I never see the form with the progress bar displayed. Thanks