home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Form1
- Caption = "BatchEdit (Untitled)"
- ClientHeight = 6630
- ClientLeft = 1095
- ClientTop = 1770
- ClientWidth = 7365
- Height = 7320
- Left = 1035
- LinkTopic = "Form1"
- ScaleHeight = 6630
- ScaleWidth = 7365
- Top = 1140
- Width = 7485
- Begin PictureBox CMDialog2
- BackColor = &H000000FF&
- Height = 1000
- Left = 0
- ScaleHeight = 975
- ScaleWidth = 975
- TabIndex = 1
- Top = 0
- Width = 1000
- End
- Begin PictureBox CMDialog1
- BackColor = &H000000FF&
- Height = 1000
- Left = 0
- ScaleHeight = 975
- ScaleWidth = 975
- TabIndex = 2
- Top = 0
- Width = 1000
- End
- Begin TextBox Text1
- BorderStyle = 0 'None
- ForeColor = &H00000000&
- Height = 6855
- Left = 0
- MultiLine = -1 'True
- TabIndex = 0
- Top = 0
- Width = 9615
- End
- Begin Menu mnuFile
- Caption = "&File"
- Index = 1
- Begin Menu mnuFileOpen
- Caption = "&Open"
- Index = 2
- End
- Begin Menu mnuFileSaveAs
- Caption = "&Save As"
- Index = 3
- End
- Begin Menu mnuFilePrint
- Caption = "&Print"
- Index = 9
- End
- Begin Menu mnuFileExit
- Caption = "E&xit"
- Index = 6
- End
- End
- Begin Menu mnuRun
- Caption = "&Run"
- Index = 4
- End
- Begin Menu mnuCustom
- Caption = "&Custom"
- Index = 5
- Begin Menu mnuCustomColor
- Caption = "Co&lor"
- Index = 7
- End
- Begin Menu mnuCustomFont
- Caption = "Fon&t"
- Index = 8
- End
- End
- Sub mnuCustomColor_Click (Index As Integer)
- CMDialog1.Flags = 3
- CMDialog1.Color = QBColor(14)
- CMDialog1.Action = 3
- Text1.BackColor = CMDialog1.Color
- End Sub
- Sub mnuCustomFont_Click (Index As Integer)
- CMDialog1.Flags = 259
- CMDialog1.Action = 4
- On Error GoTo Canc
- Text1.FontName = CMDialog1.FontName
- Text1.FontSize = CMDialog1.FontSize
- Text1.ForeColor = CMDialog1.Color
- Text1.FontStrikethru = CMDialog1.FontStrikethru
- Text1.FontUnderline = CMDialog1.FontUnderline
- Text1.FontItalic = CMDialog1.FontItalic
- Text1.FontBold = CMDialog1.FontBold
- Canc:
- Exit Sub
- End Sub
- Sub mnuFileExit_Click (Index As Integer)
- End Sub
- Sub mnuFileNew_Click (Index As Integer)
- End Sub
- Sub mnuFileOpen_Click (Index As Integer)
- CMDialog1.FilterIndex = 2
- CMDialog1.Filter = "Batch Files(*.bat)|*.bat"
- CMDialog1.Action = 1
- On Error GoTo Handler
- ReDim FileData(30)
- F = FreeFile
- Open (CMDialog1.Filename) For Input As F
- WordWrap = True
- AutoSize = True
- Text1.Text = Input$(LOF(F), F)
- Form1.Caption = "BatchEdit " & CMDialog1.Filename
- Close
- Handler:
- Exit Sub
- End Sub
- Sub mnuFilePrint_Click (Index As Integer)
- CancelError = True
- CMDialog1.Flags = 0
- CMDialog1.Action = 5
- Printer.FontSize = Text1.FontSize
- Printer.FontName = Text1.FontName
- Printer.FontBold = Text1.FontBold
- Printer.FontItalic = Text1.FontItalic
- Printer.FontStrikethru = Text1.FontStrikethru
- Printer.Print Text1.Text
- errr:
- Exit Sub
- End Sub
- Sub mnuFileSaveAs_Click (Index As Integer)
- CMDialog2.FilterIndex = 2
- CMDialog2.Filter = "Batch Files(*.bat)|*.bat"
- CMDialog2.Action = 2
- F = FreeFile
- On Error GoTo Erri
- Open (CMDialog2.Filename) For Output As F
- Print #F, Text1.Text
- Close #F
- Erri:
- Close
- Exit Sub
- End Sub
- Sub mnuRun_Click (Index As Integer)
- If Form1.Caption = "BatchEdit (Untitled)" Then
- MsgBox ("You must save the file before executing it!")
- Exit Sub
- End If
- On Error GoTo No
- N = InputBox("If any, what are the command-line parameters")
- X = Shell(CMDialog1.Filename & " " & N)
- Exit Sub
- End Sub
- Sub mnuRunCommand_Click (Index As Integer)
- On Error GoTo Eri
- X = Shell(CMDialog1.Filename)
- Exit Sub
- End Sub
-