Display Form through UIPath

Hi Richard,

This would be that way in VB.Net

Dim frm As New System.Windows.forms.form

Dim bar As ProgressBar = New ProgressBar()
bar.Location = New System.Drawing.Point(50, 20)
bar.Name = “progressBar1”
bar.Size = New System.Drawing.Size(171, 23)
bar.TabIndex = 0
bar.Style = ProgressBarStyle.Marquee
bar.Minimum = 0
bar.Maximum = 100
frm.Controls.Add(bar)
frm.Show()

Importing System.windows.Forms first is required, note also that you will get no intelisense from it inside the code activity.

However, once the last step of the workflow will finish, the form will disapear.
to test it you can use a message box activty after the code activity to block the thread.

However to do this kind of thing i would rather strongly recommend either using Custom Activities or even making an .exe with visual studio and starting process using the file path, then killing or close mainwindow from once everything is done.

Cheers.

7 Likes