thanks for the help. I was looking for the openfiledialog only.
While setting the filter here, i am facing a problem. I want to select only image files. So i wrote like thisbut this is not showing the files with jpg extension, and i have to select All files option to view that. Where am i doing it wrong?Code:openFileDialog1.Filter = "image (*.jpg) |*.bmp;*.gif|All files (*.*)|*.*"
this is the complete codeCode:Dim openFileDialog1 As System.Windows.Forms.OpenFileDialog openFileDialog1 = New System.Windows.Forms.OpenFileDialog() openFileDialog1.InitialDirectory = "D:\" ' openFileDialog1.Filter = "image (*.jpg) |*.bmp;*.rtf|(*.txt) |*.txt|(*.*) |*.*" 'openFileDialog1.Filter = " (*.jpg) |*.bmp;*.rtf|(*.txt) |*.txt|(*.*) |*.*" openFileDialog1.Filter = "*.jpg|*.jpg |All files (*.*)|*.*" If openFileDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK Then locpic.Text = openFileDialog1.FileName End If




Reply With Quote
