Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WinForm problem
Message
From
28/07/2010 12:52:34
 
 
To
28/07/2010 12:23:17
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Environment versions
Environment:
VB 9.0
Miscellaneous
Thread ID:
01474304
Message ID:
01474315
Views:
61
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform