is this right?
Code:Public Class Form1 Dim OpePro As String Dim posl As Integer Dim NPB As Button Public i As Integer Private Sub Add_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Add.Click OpenFileDialog1.ShowDialog() OpePro = OpenFileDialog1.FileName posl = posl + 75 For Me.i = 0 To OpePro.Length - 1 NPB = New Button NPB.Text = OpePro(i) NPB.Width = 75 NPB.Height = 62 NPB.Left = posl NPB.Top = 0 Controls.Add(NPB) AddHandler NPB.Click, AddressOf Button1_Click Next End Sub Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Process.Start(OpePro) End Sub Private Sub Task_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Task.Click System.Diagnostics.Process.Start("taskmgr.exe") End Sub Private Sub Calc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Calc.Click System.Diagnostics.Process.Start("calc.exe") End Sub End Class




Reply With Quote