home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CICA 1994 September
/
CICA_Shareware_for_Windows_Walnut_Creek_September_1994.iso
/
win3
/
winsock
/
gcp_24.exe
/
NOTEPAD.FR_
/
NOTEPAD.FR
Wrap
Text File
|
1994-03-06
|
10KB
|
371 lines
VERSION 2.00
Begin Form frmNotePad
BackColor = &H00000000&
ClientHeight = 4470
ClientLeft = 1845
ClientTop = 3570
ClientWidth = 6765
ClipControls = 0 'False
DrawStyle = 5 'Transparent
FillColor = &H00FFFFFF&
Height = 5130
Left = 1800
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 4470
ScaleWidth = 6765
Top = 2955
Visible = 0 'False
Width = 6855
Begin GCP_220 VT1
Align = 1 'Align Top
AutoWrap = -1 'True
BackColor = 0 'BLACK
BoldColor = 3 'CYAN
CharSet = 0 'DEC Large
CommSettings = "COM4:9600,n,8,1"
CursorKeys = 0 'Normal
EditKeys = 0 'DEC Map
FlowControl = 1 'Software (XON/XOFF)
ForeColor = 7 'WHITE
Height = 2895
Keypad = 0 'Numeric
Left = 0
LocalEcho = 0 'False
Password = ""
PasswordPrompt = "assword:"
PrintMode = 0 'Normal
Protocol = 1 'TELNET
RemoteAddress = ""
TabIndex = 1
TermType = 0 'VT200
Top = 0
Username = ""
UsernamePrompt = "ogin:"
Width = 6765
End
Begin TextBox Text1
Height = 375
Left = 360
TabIndex = 0
Text = "Text1"
Top = 3960
Visible = 0 'False
Width = 2655
End
Begin Menu mnuFile
Caption = "&File"
Begin Menu mnuFNewSession
Caption = "&New..."
End
Begin Menu mnuFOpenSession
Caption = "&Open..."
End
Begin Menu mnuFClose
Caption = "&Close"
End
Begin Menu mnuFSave
Caption = "&Save"
End
Begin Menu mnuFSaveAs
Caption = "Save &As..."
End
Begin Menu mnuFSep1
Caption = "-"
End
Begin Menu mnuFSelectPrinter
Caption = "Printer Setup..."
End
Begin Menu mnuFPrintScreen
Caption = "Print Screen"
End
Begin Menu mnuFSep2
Caption = "-"
End
Begin Menu mnuFExit
Caption = "E&xit"
End
End
Begin Menu mnuEdit
Caption = "&Edit"
Begin Menu mnuECopy
Caption = "&Copy"
End
Begin Menu mnuEPaste
Caption = "&Paste"
End
Begin Menu mnuEClear
Caption = "C&lear"
End
End
Begin Menu mnuOptions
Caption = "&Options"
Begin Menu mnuOTelnet
Caption = "T&ELNET Connect"
End
Begin Menu mnuOAsync
Caption = "&Dial Up"
End
Begin Menu mnuSep2
Caption = "-"
End
Begin Menu mnuOColor
Caption = "C&olor..."
End
Begin Menu mnuFont
Caption = "&Font..."
End
Begin Menu mnuOKey
Caption = "&Key Maps..."
End
Begin Menu mnuOTerminal
Caption = "&Terminal..."
End
Begin Menu mnuOSep1
Caption = "-"
End
Begin Menu mnuFShowServer
Caption = "&Show TELNET Server"
End
Begin Menu mnuFHideServer
Caption = "&Hide TELNET Server"
End
End
Begin Menu mnuWindow
Caption = "&Window"
WindowList = -1 'True
Begin Menu mnuWCascade
Caption = "&Cascade"
End
Begin Menu mnuWTile
Caption = "&Tile"
End
Begin Menu mnuWArrange
Caption = "&Arrange Icons"
End
End
Begin Menu mnuHelp
Caption = "&Help"
Begin Menu mnuHContents
Caption = "Contents..."
End
Begin Menu mnuHAbout
Caption = "About..."
End
End
End
Sub Form_Load ()
Me.Left = GetPrivateProfileInt(FState(FIndex).Session, "Left", 0, IniFile)
Me.Height = GetPrivateProfileInt(FState(FIndex).Session, "Height", 0, IniFile)
Me.Top = GetPrivateProfileInt(FState(FIndex).Session, "Top", frmmdi.ScaleHeight, IniFile)
Me.Width = GetPrivateProfileInt(FState(FIndex).Session, "Width", frmmdi.ScaleWidth, IniFile)
If Me.Left > (frmmdi.ScaleWidth / 2) Then Me.Left = 0
If Me.Top > (frmmdi.ScaleHeight / 2) Then Me.Top = 0
If Me.Height > (frmmdi.ScaleHeight - Me.Top) Then Me.Height = frmmdi.ScaleHeight - Me.Top
If Me.Width > (frmmdi.ScaleWidth - Me.Left) Then Me.Width = frmmdi.ScaleWidth - Me.Left
End Sub
Sub Form_QueryUnload (Cancel As Integer, UnloadMode As Integer)
If (VT1.OpenComm) Then
Cancel = True
Me.Caption = FState(Me.Tag).Session & " - closing..."
VT1.OpenComm = False
Else
Cancel = False
End If
End Sub
Sub Form_Resize ()
If windowstate <> 1 And ScaleHeight <> 0 Then
VT1.Height = ScaleHeight
End If
End Sub
Sub Form_Unload (Cancel As Integer)
Dim intNumSess% ' Number of remaining sessions - DNW
FState(Tag).Deleted = True
' Any other forms?
If (Not Sessions()) Then
frmmdi.Icon = LoadPicture("net09b.ico") ' closed icon
End If
' save parameters
SaveFileAs (FState(Tag).Session)
End Sub
Sub mnuEClear_Click ()
VT1.ClearScreen = True
End Sub
Sub mnuECopy_Click ()
VT1.Copy = True
End Sub
Sub mnuEPaste_Click ()
VT1.Paste = True
End Sub
Sub mnuFClose_Click ()
Unload Me
End Sub
Sub mnuFExit_Click ()
' Unloading the MDI form invokes the QueryUnload event
' for each child form, then the MDI form - before unloading
' the MDI form. Setting the Cancel argument to True in any of the
' QueryUnload events aborts the unload.
Unload frmmdi
End Sub
Sub mnuFHideServer_Click ()
VT1.ShowServer = False
End Sub
Sub mnuFNewSession_Click ()
CenterForm frmmdi, NewSession
NewSession.Show 1
End Sub
Sub mnuFont_Click ()
'Load CharSetDlg
CenterForm frmmdi, CharSetDlg
CharSetDlg.Show Modal
End Sub
Sub mnuFOpenSession_Click ()
CenterForm frmmdi, OpenSession
OpenSession.Show 1
End Sub
Sub mnuFPrintScreen_Click ()
VT1.PrintScreen = "screen"
End Sub
Sub mnuFSave_Click ()
If FState(Me.Tag).Session = "" Then
FState(Me.Tag).Session = GetFilename("Enter Configuration Name", "host")
End If
If FState(Me.Tag).Session <> "" Then
SaveFileAs (FState(Me.Tag).Session)
End If
End Sub
Sub mnuFSaveAs_Click ()
Dim SaveFileName As String
FState(Me.Tag).Session = GetFilename("Save Session As", (FState(Me.Tag).Session))
If FState(Me.Tag).Session <> "" Then
SaveFileAs (FState(Me.Tag).Session)
End If
End Sub
Sub mnuFSelectPrinter_Click ()
VT1.SelectPrinter = True
End Sub
Sub mnuFShowServer_Click ()
VT1.ShowServer = True
End Sub
Sub mnuHAbout_Click ()
frmAbout.Show 1
End Sub
Sub mnuHContents_Click ()
r = Shell("WinHelp.exe vt220fwg.hlp")
End Sub
Sub mnuOAsync_Click ()
ConfigScrn.Show Modal
End Sub
Sub mnuOColor_Click ()
CenterForm frmmdi, ColorDlg
ColorDlg.Show Modal
End Sub
Sub mnuOKey_Click ()
Load Keyboard
Keyboard.Show Modal
End Sub
Sub mnuOTelnet_Click ()
Dim HostName As String
HostName = GetFilename("Enter Host Name", (Me.VT1.RemoteAddress))
If (HostName <> "") Then
If FState(Me.Tag).Session = "" Then
FState(Me.Tag).Session = HostName
End If
Me.VT1.RemoteAddress = HostName
Me.VT1.Protocol = 1
Me.Caption = FState(Me.Tag).Session & " - connecting..."
Me.VT1.OpenComm = True
End If
End Sub
Sub mnuOTerminal_Click ()
Emulation.Show 1
End Sub
Sub mnuWArrange_Click ()
frmmdi.Arrange ARRANGE_ICONS
End Sub
Sub mnuWCascade_Click ()
frmmdi.Arrange CASCADE
End Sub
Sub mnuWTile_Click ()
frmmdi.Arrange TILE_HORIZONTAL
End Sub
Sub Text1_Change ()
FState(Me.Tag).Dirty = True
End Sub
Sub VT1_Console (Message As String)
MsgBox Message, 64 + 4096, "Console Message from VT-220"
End Sub
Sub VT1_OnCloseComm (ErrorCode As Integer)
Me.Caption = FState(Me.Tag).Session & " - closed"
Me.mnuOTelnet.Enabled = True
Me.mnuOAsync.Enabled = True
Me.Icon = LoadPicture("net09b.ico") ' closed icon
'Unload Me
End Sub
Sub VT1_OnInput (Buffer As String, ErrorCode As Integer)
'If Buffer = "OK" Then
' make call and disable input
'VT1.EnableInput = False
'VT1.Output = "ATDT7927221" & Chr$(13) & Chr$(10)
'End If
End Sub
Sub VT1_OnOpenComm (ErrorCode As Integer)
If ErrorCode Then
Me.Caption = FState(Me.Tag).Session & " - closed"
Icon = LoadPicture("net09b.ico")
Else
Me.Caption = FState(Me.Tag).Session & " - open"
' Icon shows us open
frmmdi.Icon = LoadPicture("net09a.ico")
Icon = LoadPicture("net09a.ico")
mnuOTelnet.Enabled = False
mnuOAsync.Enabled = False
' if a modem, send init string
If VT1.Protocol = 0 Then
VT1.Output = ConfigScrn.ModemInitString & ConfigScrn.Dial & ConfigScrn.Phone & Chr$(13)
End If
End If
End Sub