Thax, but i have to print 112 reports at once using a foreach. This report is a stock and sales for 112 outlets of a supermarket. user wanna print all the reports at once. but he need to select the printer.
The current directory is NOT the application directory.
If I open a command prompt, change to C:\Windows and run the application C:\MyProg.exe your example will not work. The file 1.log is in C:\, but the current directory is C:\Windows so I will get a file not found exception.
i am trying to chage the text of a label,
but the thing is that its not fast
i am setting the text before some function calls but the text is changed after all the functions.
Do you know any effective method to quickly change the text of a label
You can check you sample it will not work,i mean will not give the textchange
i had tried this earlier...
actually the thing is that my methods itself taking more time to execute.
You know anyother methods
You need to tell Windows to redraw the label with :
label1.Text = " method1";
label1.Text = "method2";
label1.Text = "method3";
From the help for Control.Refresh:
Forces the control to invalidate its client area and immediately redraw itself and any child controls.
I think this cannot work. Setting the label text generates under water a message to the control. The label control then must update itself. If you change the label text three times inside the same method, you do not give control back to the message loop. So the message loop starts updating only after the third change and you will not notice the change.
I'm not sure how to solve this. It may be a design error. Maybe you can solve this using an owner drawn label or by using timers.
Last Visit: 31-Dec-99 19:00 Last Update: 20-Feb-24 13:21