Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi, I am moving from VB6 to vb.net...

 

In vb6 I can reference to Ms Common Diag box and use it to pop up directory and folder...

 

How do I do it with Vb.net....When i try to reference the com I could not find Ms Common Diag....

 

pls help! apprec

  • *Experts*
Posted

Dim opendialog As New OpenFileDialog() 'declare a new open file dialog
'now set some options..
opendialog.Filter = "Text Files (*.txt)|*.txt" 'example of a filter
opendialog.CheckFileExists = True
'.. there is more options, check your SDK documentation 
If opendialog.ShowDialog() = DialogResult.OK Then 'if user pressed ok
   'do what you want because the user selected the file you can get it using:
   opendialog.FileName
End If

Remeber to check for DialogResult on all your dialog boxes.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...