You are on page 1of 2

Guardar: Dim Save As New SaveFileDialog() Dim myStreamWriter As System.IO.StreamWriter Save.Filter = "Text(*.txt)|*.txt|HTML(*.html*)|*.html|PHP(*.php*)|*.php*|All Files(*.*)|*.*" Save.CheckPathExists = True Save.

Title = "Guardar como" Save.ShowDialog(Me) Try myStreamWriter = System.IO.File.AppendText(Save.FileName) myStreamWriter.Write(document.Text) myStreamWriter.Flush() Catch ex As Exception End Try

Abrir: Dim Open As New OpenFileDialog() Dim myStreamReader As System.IO.StreamReader Open.Filter = "Text [*.txt*]|*.txt|All Files [*,*]|*,*" Open.CheckFileExists = True Open.Title = "Abrir Archivo" Open.ShowDialog(Me) Try Open.OpenFile() myStreamReader = System.IO.File.OpenText(Open.FileName) document.Text = myStreamReader.ReadToEnd() Catch ex As Exception End Try

Salir: Me.Close Nuevo : document.Clear

Atras: document.undo Adelante: document.Redo () Copiar: document.copy Pegar: document.Paste Cortar: document.Cut Seleccionar: document.Selectall Limpiar todo:

document.Clear

Fuente: Try Dim dlg As FontDialog = New FontDialog dlg.Font = document.Font If dlg.ShowDialog = System.Windows.Forms.DialogResult.OK Then document.Font = dlg.Font End If

Catch ex As Exception End Try

Color: Try Dim dlg As ColorDialog = New ColorDialog dlg.Color = document.ForeColor If dlg.ShowDialog = System.Windows.Forms.DialogResult.OK Then document.ForeColor = dlg.Color End If Catch ex As Exception End Try

You might also like