Sub BtnStop_Click
Dim fd As FileDialog
Dim ret As Int
Dim sets As Map
fd.FastScroll = True
fd.FilePath = File.DirApp ' also sets ChosenName to an emtpy string
fd.ChosenName = "txt"
ret = fd.Show("Please Enter File Name", "Save", "Cancel", "",Null)
If ret = -1 Then
sets.Clear
sets.Put("TextArea1", TextArea1.Text)
File.WriteMap(fd.FilePath, fd.ChosenName & ".txt", sets)
End If
End Sub