home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
PROG_BAS
/
ED11.ZIP
/
ED.FRM
< prev
next >
Wrap
Text File
|
1994-01-27
|
6KB
|
243 lines
VERSION 2.00
Begin Form Edit
BorderStyle = 1 'Fixed Single
Caption = "Edit"
ClientHeight = 4350
ClientLeft = 1470
ClientTop = 1815
ClientWidth = 4575
Height = 5040
Icon = ED.FRX:0000
Left = 1410
LinkMode = 1 'Source
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 4350
ScaleWidth = 4575
Top = 1185
Width = 4695
Begin CommandButton OK
Cancel = -1 'True
Caption = "OK"
Default = -1 'True
Height = 300
Left = 2850
TabIndex = 4
Top = 3900
Width = 1260
End
Begin CommandButton Cancel
Caption = "Cancel / End"
Height = 300
Left = 615
TabIndex = 3
Top = 3915
Width = 1260
End
Begin FileListBox File1
Height = 3150
Left = 2445
TabIndex = 2
Top = 630
Width = 2055
End
Begin DirListBox Dir1
Height = 3210
Left = 75
TabIndex = 1
Top = 615
Width = 2235
End
Begin ComboBox wildcard
Height = 300
Left = 2445
Sorted = -1 'True
TabIndex = 5
Top = 210
Width = 2070
End
Begin DriveListBox Drive1
Height = 315
Left = 120
TabIndex = 0
Top = 210
Width = 2235
End
Begin Menu file
Caption = "&File"
Begin Menu new
Caption = "&New"
End
Begin Menu leave
Caption = "E&xit"
End
End
Begin Menu options
Caption = "&Options"
Begin Menu seted
Caption = "&Set Editor Name"
End
Begin Menu ExitAfter
Caption = "E&xit After Editor Starts"
End
End
Begin Menu Help
Caption = "&Help"
Begin Menu HelpContents
Caption = "&Contents"
End
Begin Menu SepBar
Caption = "-"
End
Begin Menu about
Caption = "&About Ed..."
End
End
End
Option Explicit
Sub about_Click ()
Dim m As String
m = "ED 1.1 Editor Interface " & Chr$(13) & Chr$(10)
m = m & "Written in Microsoft Visual Basic" & Chr$(13) & Chr$(10)
m = m & "ED 1.0 06/23/91 - R. Neal - 72315,116" & Chr$(13) & Chr$(10)
m = m & "ED 1.1 01/26/94 - Network Resources - 73472,1543"
MsgBox m, 0, "About ED"
End Sub
Sub Cancel_Click ()
End
End Sub
Sub Dir1_Change ()
file1.Path = dir1.Path
wildcard.Text = file1.Pattern
End Sub
Sub Drive1_Change ()
dir1.Path = drive1.Drive
wildcard.Text = file1.Pattern
End Sub
Sub ExitAfter_Click ()
Dim RetVal As Integer, Tmp As String
If ExitAfter.Checked = True Then
ExitAfter.Checked = False
Tmp = "False"
Else
ExitAfter.Checked = True
Tmp = "True"
End If
RetVal = WritePrivateProfileString("Config", "TermAfterStart", Tmp, "EDCTL.INI")
End Sub
Sub File1_Click ()
wildcard.Text = file1.FileName
End Sub
Sub file1_dblclick ()
Dim c As String, i As Integer, r As Integer
ChDrive drive1.Drive
ChDir dir1.Path
c = EdName & " " & file1.FileName
r = Shell(c)
If ExitAfter.Checked = True Then End
End Sub
Sub Form_Load ()
Dim RetVal As Integer, Key As String
Dim IniString As String
' Must be big enough for the return string from GetPrivateProfileString.
IniString = String(255, 0)
Key = "TermAfterStart"
RetVal = GetPrivateProfileString("Config", Key, "None", IniString, Len(IniString), "EDCTL.INI")
If RetVal And Left(IniString, 4) <> "None" Then
If UCase$(IniString) = "True" Then
ExitAfter.Checked = True
End If
End If
Key = "Editor"
RetVal = GetPrivateProfileString("Config", Key, "None", IniString, Len(IniString), "EDCTL.INI")
If RetVal And Left(IniString, 4) <> "None" Then
EdName = IniString
End If
dir1.Path = Left$(CurDir$, 2) & "\"
file1.Pattern = "*.*"
wildcard.Text = file1.Pattern
wildcard.AddItem "*.*"
wildcard.AddItem "*.bat"
wildcard.AddItem "*.txt"
wildcard.AddItem "*.doc"
wildcard.AddItem "*.bas"
wildcard.AddItem "*.frm"
wildcard.AddItem "*.c"
wildcard.AddItem "*.h"
wildcard.AddItem "*.cob"
wildcard.AddItem "*.pas"
wildcard.AddItem "*.prg"
wildcard.AddItem "*.ini"
wildcard.AddItem "*.mak"
End Sub
Sub Form_Unload (Cancel As Integer)
End
End Sub
Sub HelpContents_Click ()
Dim x As Integer
x = WinHelp(hWnd, "ED.HLP", HELP_INDEX, -1)
End Sub
Sub leave_Click ()
End
End Sub
Sub new_Click ()
Dim edf As String, r As Integer
edf = InputBox$("Enter file name:", "New File")
If edf = "" Then Exit Sub
r = Shell(EdName + " " + edf)
End Sub
Sub OK_Click ()
Dim a As Integer, q As Integer
a = InStr(wildcard.Text, "*")
q = InStr(wildcard.Text, "?")
If a > 0 Or q > 0 Then
file1.Pattern = wildcard.Text
Else
file1_dblclick
End If
End Sub
Sub SearchHelp_Click ()
Dim x As Integer
x = WinHelp(hWnd, "ED.HLP", HELP_PARTIALKEY, 0)
End Sub
Sub seted_Click ()
Dim RetVal As Integer, e As String
e = InputBox$("Enter the name of the command (.PIF, .EXE, .COM, or .BAT file) that ED should execute to start your editor:", "Set Editor Name", EdName)
If e = "" Then Exit Sub
RetVal = WritePrivateProfileString("Config", "Editor", e, "EDCTL.INI")
EdName = e
End Sub
Sub wildcard_Click ()
file1.Pattern = wildcard.Text
End Sub