PDA

View Full Version : [Visual C#] Windows Forms


Steel Jans
17-01-2008, 15:09
Ho questo problema:
Devo richiamare un form che si occupa di eseguire un task specifico (quindi non interagisce con l'utente).
Su questo form è presente una progressbar e alcune etichette di testo.
Quando richiamo il form, però, il task si avvia prima che il form venga completamente visualizzato e di conseguenza la progressbar e le etichette vengono visualizzate solo quando il processo è completato.
Ho provato anche ad utilizzare gli eventi Shown, Load, VisibleChanged, ma il risultato non è cambiato.
Come posso fare per visualizzare prima tutta la form e poi iniziare il processo?

ReaToMe
17-01-2008, 17:56
Puoi usare l'evento Activated della form.

http://msdn2.microsoft.com/en-us/library/system.windows.forms.form.activated(VS.80).aspx

Steel Jans
18-01-2008, 09:30
Ho risolto semplicemente invocando il metodo refresh() prima di avviare il processo.
Grazie comunque!

miniBill
18-01-2008, 21:39
System.Threading.Thread

Hardware Upgrade Forum Database Error
Database Error Database error
The Hardware Upgrade Forum database has encountered a problem.

Please try the following:
  • Load the page again by clicking the Refresh button in your web browser.
  • Open the www.hwupgrade.it home page, then try to open another page.
  • Click the Back button to try another link.
The www.hwupgrade.it forum technical staff have been notified of the error, though you may contact them if the problem persists.
 
We apologise for any inconvenience.