Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WinForm problem
Message
De
28/07/2010 13:39:53
 
 
À
28/07/2010 12:52:34
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:
01474320
Vues:
42
Excellent. That did the trick.

Now I need to read up on how Delegates are used. Learning something new every day.

Sorry that I was not able to give this solution the Stars it deserves, the button on the bottom of this reply window is missing. but anyway "***"

>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.
Greg Reichert
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform