Note: This example is for VS2010, it may work in 2008 but I can't support it.
This is a small example application to show you how to use My.Seetings in vb.net in order to run an external application.
Code:
If you find it useful rate me or say thanks, it gives me a reason to continue.Code:Public Class Form1 Dim strFileName As String Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click OpenFileDialog1.InitialDirectory = "C:\" OpenFileDialog1.Title = "Open an .exe File" OpenFileDialog1.Filter = "Executable Files|*.exe" OpenFileDialog1.ShowDialog() strFileName = OpenFileDialog1.FileName End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click My.Settings.path = strFileName TextBox1.Text = My.Settings.path End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click If My.Settings.path = "" Then MsgBox("Not selected path!") Else Process.Start(My.Settings.path) End If End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load TextBox1.Text = My.Settings.path End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click My.Settings.path = "" TextBox1.Text = "" End Sub End Class




Reply With Quote