I have a simple application where i send some data to a webserver by post. And while i do it i'm adding items to a listbox, just to inform the steps that are being done.
And after all finished the form with the listbox should show the information for 5 seconds and exit application.
My problem is, all the steps are working great with no problems, but while the steps are being done and i'm adding items to the listbox, the listbox doesn't show nothing, just blank. And in the end after all steps are done, wait's the 5 seconds with the listbox continuously blank and finally closes...
The code is inside the Form.Shown event, something like this:
private void Form1_Shown(object sender, EventArgs e)
string lines = System.IO.File.ReadAllLines(@"C:\tmp\printers.txt");
foreach (string line in lines)
responsefromserverRACC = "";
while (responsefromserverRACC == "")
listBoxReport.Items.Add("Initiating: " + line);
// code code
catch (Exception em)
Should i do this different? In another event?
Or i just can't do it? :)
Thx in advanced,