Jump to content


- - - - -

Save File Minor Issue


  • Please log in to reply
No replies to this topic

#1 AWS

AWS

    Administrator

  • Administrators
  • 44511 posts
  • LocationJoliet, IL U.S.A.

Posted 04 February 2012 - 11:46 PM

Trying to make a save file dialog for this program. I have it working without syntax errors but its telling me "empty path name is not legal" and gives me a "Argumentexception was unhandled"

 

Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
        Dim AppSerializer As Xml.Serialization.XmlSerializer = New Xml.Serialization.XmlSerializer(GetType(Storage))
        Dim AppWriter As StreamWriter = New StreamWriter(SaveFileDialog1.FileName)
        SaveFileDialog1.ShowDialog()
        AppSerializer.Serialize(AppWriter, Storage)
        AppWriter.Close()
        Me.Update()
    End Sub


 


View the full article




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users