cancel
Showing results for 
Search instead for 
Did you mean: 

Open file dialog Box Problem

Former Member
0 Kudos

I donot know why i have to Click open twice for to get filename

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi RakeshBos

Problem could be because of

you need not to include firstly FileDialog.ShowDialog(MyWindow) and then asking for the click event whether its OK or Cancel

just do this directly----

''FileDialog.ShowDialog(MyWindow)--- DONT INCLUDE THIS LINE

If FileDialog.ShowDialog(MyWindow) = DialogResult.OK Then

sboPath.Value = FileDialog.FileName

ElseIf FileDialog.ShowDialog(MyWindow) = DialogResult.Cancel And sboPath.Value = "" Then

sboPath.Value = ""

End If

Regards

Saurabh

Edited by: SAPRasto on Mar 11, 2010 7:52 AM

Answers (0)