Save Save As and Open dialogs ( sorry but some problems with first code I submitted)
Save Save As and Open dialogs ( sorry but some problems with first code I submitted)
API Declarations
Main.Caption = "Untitled"
cdiailog.FileName=Main.Caption
End Sub
Rate Save Save As and Open dialogs ( sorry but some problems with first code I submitted)
(1(1 Vote))
If Error then err
cdialog.Filter="Text (*.txt)|*.txt|"
cdialog.ShowSave
Open cdilaog.FileName For output As #1
Print #1, TextBox
Close #1
err:
End Sub
Private Sub Open()
If Error Then err
cdialog.Filter="Text (*.txt)|*.txt|"
cdialog.ShowOpen
Open cdilaog.Filename For Input As #1
Print TextBox, #1
Close #1
Main.Caption=cdialog.FileName
err:
End Sub
Private Sub Save()
If Error The Err
cdialog.Filter="Text (*.txt)|*.txt|" 'this is here to provide uniformity
If cdilaog.FileName="" Then Save_As ' if there is no filename this will send the program to Save As to ask for a file name or else it will carry on
Open cdilaog.Filename For Output As #1 ' This opens the file if it has a name then saves the contents of the textbox into it.
Print #1, TextBox
Close #1
err:
End Sub
Save Save As and Open dialogs ( sorry but some problems with first code I submitted) Comments
No comments yet — be the first to post one!
Post a Comment