Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WinForm problem
Message
De
28/07/2010 12:52:34
 
 
À
28/07/2010 12:23:17
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Versions des environnements
Environment:
VB 9.0
Divers
Thread ID:
01474304
Message ID:
01474315
Vues:
62
This message has been marked as the solution to the initial question of the thread.
Hi Greg,
I doing this on next way...
Public Sub New()
    InitializeComponents()
    ReadFiles()
End Sub

Private Sub ReadFiles()
Dim loThread as System.Threading.Thread = new System.Threading.Thread(AddressOf _readfiles())
loThread.Start()
End Sub

Private Sub _ReadFiles()
 ... here some code to scan files
   Dim loDelegate as _dlg_updateprogress = New _dlg_updateprogress(AddressOf _on_updateprogress)
   Dim loForm as System.Windows.Forms.Form = Me.FindForm()
   lcProgressState = String.Format("Loading {0}%",lnProcentValue)
   loForm.Invoke(loDelegate,New Object(){lcProgressState})
End Sub

Delegate Sub _dlg_updateprogress(ByVal tcProgressState as String)

Private Sub _on_updateprogress(ByVal tcProgressState as String)
  Me.lblProgress.Text = tcProgressState
End Sub
>Hi All,
>
>Here is a newbie question.
>
>I have a WinForm that runs process that scan files on the HD. I need the form to complete it instantiation before the processing starts. During the running of the process it will display the current status of the operation on the form.
>
>Question is where do I place the call to the processing method?
>
> I tried the Shown event, but the form hangs and never finishes instantiating. Therefore, the status is not displayed.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform