Login    
 
 
 
 
Text/HTML
  
You are here :: Blogs Saturday, May 19, 2012

Search
Note: This uses the internal blog search engine. The Google search engine is also available at the top of the page.
  
Disclaimer

Please review the site disclaimer before downloading or using content found on this site

  
Categories
  
DEVSHED Blog
As always, I welcome your comments!
Aug 20

Written by: Steve Gray
8/20/2010 6:08 PM  RssIcon

This code was written against Visual Studio 2010

You’ll need to first drop the OpenFileDialog control onto your form

        OpenFileDialog1.Filter = "XML Files|*.xml|All files (*.*)|*.*"
        OpenFileDialog1.Title = "Select an XML File"
        'OpenFileDialog1.InitialDirectory = "c:\"
        'OpenFileDialog1.FilterIndex = 2
        'OpenFileDialog1.RestoreDirectory = True
        OpenFileDialog1.FileName = ""
        If OpenFileDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
            Me.txtSourceFile.Text = OpenFileDialog1.FileName
            Dim strPath = Path.GetDirectoryName(Me.txtSourceFile.Text)
            Dim strFileName = Path.GetFileNameWithoutExtension(Me.txtSourceFile.Text)
            Me.txtDestinationFile.Text = Path.Combine(strPath, strFileName & "OUT.XML")
        End If

Tags:
Categories:
As always, I welcome your comments!
  
 
 
Home | Products | Blogs | Contact Us | Links | God's Plan
Privacy Statement | Terms Of Use
 
Copyright 2011 by Devshed.us