Anyone would suggest me when i open a file and cilck ok button it should open in seperate dialog box. Here when i am clicking on open button, the dialog box appears. I selected a particular file, while opening the file its showing the path name in text box i gave to my form.
This i am using to open a file dialog, and selecting the file which is showing it into the textbox.
Private Sub OpenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenToolStripMenuItem.Click
If OpenFileDialog1.ShowDialog() <> Windows.Forms.DialogResult.Cancel Then
TextBox1.Text = OpenFileDialog1.FileName
End If
End Sub
But when i click on open buttons next to textbox, that file should open which i have selected. Here is the Image of that.
Would anyone suggest me how to write the code for that.
Regard
Mithil



Albertto LiePosted May 24, 2010, 7:28 AM
maybe this help
1st u have to add some code
using System.Diagnostics;
then add some other code to your button event
Private Sub OpenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenToolStripMenuItem.Click
If OpenFileDialog1.ShowDialog() <> Windows.Forms.DialogResult.Cancel Then
TextBox1.Text = OpenFileDialog1.FileName
End If
End Sub
mithil MalhotraPosted May 24, 2010, 8:10 AM
I have made Menustrip with menu File
Please suggest me the code for that........
Thanks and Regard
Mithil
mithil MalhotraPosted May 24, 2010, 8:05 AM
Thanks, it helped me as i go one step further doing my project work.