07-10-17, 11:03 PM
PHP كود :
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim thread As New Threading.Thread(AddressOf installation) With {.IsBackground = True}
thread.Start()
End Sub
Sub installation()
If CheckedListBox1.CheckedItems.Count > 0 Then
Me.Invoke(Sub() Me.Enabled = False)
'Button1.Invoke(Sub() Button1.Enabled = False)
For Each itm In CheckedListBox1.CheckedItems
ToolStripStatusLabel1.Text = itm
Process.Start(itm).WaitForExit()
Next
'Button1.Invoke(Sub() Button1.Enabled = True)
Me.Invoke(Sub() Me.Enabled = True)
ToolStripStatusLabel1.Text = "تم الانتهاء من تصطيب كل البرامج"
MsgBox("تم الانتهاء من تصطيب كل البرامج")
End If
End Sub
