home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Tool Box
/
SIMS_2.iso
/
update
/
crescent
/
mwupd
/
mwterm.frm
< prev
Wrap
Text File
|
1994-10-17
|
17KB
|
612 lines
VERSION 2.00
Begin Form MWTerm
BorderStyle = 3 'Fixed Double
Caption = "Terminal Settings"
ClientHeight = 4248
ClientLeft = 756
ClientTop = 1452
ClientWidth = 5880
Height = 4620
Icon = MWTERM.FRX:0000
Left = 708
LinkTopic = "Form2"
ScaleHeight = 4248
ScaleWidth = 5880
Top = 1128
Width = 5976
Begin PDQComm Comm1
AutoScroll = 4 'Vertical and on keypress
AutoSize = -1 'True
BackColor = 1
Columns = 20
Echo = 0 'False
Emulation = 2 'Ansi
FastScroll = -1 'True
ForeColor = 15
Height = 960
InBufferSize = 16384
Interval = 55
KeyTranslation = 0 'None
Left = 240
Notification = 0 'Manual
OutBufferSize = 16384
Rows = 5
RTSEnable = -1 'True
ScrollRows = 10
SmoothScroll = 0 'False
Top = 1080
Width = 2172
End
Begin CommandButton cmdCancel
Cancel = -1 'True
Caption = "Cancel"
Height = 492
Left = 4680
TabIndex = 34
Top = 3600
Width = 972
End
Begin CommandButton cmdOK
Caption = "OK"
Default = -1 'True
Height = 492
Left = 3600
TabIndex = 33
Top = 3600
Width = 972
End
Begin TextBox tbScrollRows
Height = 288
Left = 3840
TabIndex = 31
Top = 1800
Width = 852
End
Begin ComboBox cbScreenFilter
Height = 288
Left = 3840
TabIndex = 30
Top = 2520
Width = 1692
End
Begin TextBox tbFontSize
Height = 288
Left = 3840
TabIndex = 29
Top = 360
Width = 852
End
Begin ComboBox cbFontName
Height = 288
Left = 240
TabIndex = 28
Top = 360
Width = 3252
End
Begin ComboBox cbEmulation
Height = 288
Left = 3840
TabIndex = 27
Top = 1080
Width = 1692
End
Begin PictureBox pbForeColor
Height = 372
Left = 2400
ScaleHeight = 348
ScaleWidth = 348
TabIndex = 26
Top = 2880
Width = 372
End
Begin PictureBox pbBackColor
Height = 372
Left = 960
ScaleHeight = 348
ScaleWidth = 348
TabIndex = 25
Top = 2880
Width = 372
End
Begin PictureBox BColr
BackColor = &H00FFFFFF&
DragIcon = MWTERM.FRX:0302
Height = 372
Index = 15
Left = 2760
ScaleHeight = 348
ScaleWidth = 348
TabIndex = 24
Tag = "15"
Top = 3720
Width = 372
End
Begin PictureBox BColr
BackColor = &H0000FFFF&
DragIcon = MWTERM.FRX:0604
Height = 372
Index = 14
Left = 2400
ScaleHeight = 348
ScaleWidth = 348
TabIndex = 23
Tag = "14"
Top = 3720
Width = 372
End
Begin PictureBox BColr
BackColor = &H00FF00FF&
DragIcon = MWTERM.FRX:0906
Height = 372
Index = 13
Left = 2040
ScaleHeight = 348
ScaleWidth = 348
TabIndex = 22
Tag = "13"
Top = 3720
Width = 372
End
Begin PictureBox BColr
BackColor = &H000000FF&
DragIcon = MWTERM.FRX:0C08
Height = 372
Index = 12
Left = 1680
ScaleHeight = 348
ScaleWidth = 348
TabIndex = 21
Tag = "12"
Top = 3720
Width = 372
End
Begin PictureBox BColr
BackColor = &H00FFFF00&
DragIcon = MWTERM.FRX:0F0A
Height = 372
Index = 11
Left = 1320
ScaleHeight = 348
ScaleWidth = 348
TabIndex = 20
Tag = "11"
Top = 3720
Width = 372
End
Begin PictureBox BColr
BackColor = &H0000FF00&
DragIcon = MWTERM.FRX:120C
Height = 372
Index = 10
Left = 960
ScaleHeight = 348
ScaleWidth = 348
TabIndex = 19
Tag = "10"
Top = 3720
Width = 372
End
Begin PictureBox BColr
BackColor = &H00FF0000&
DragIcon = MWTERM.FRX:150E
Height = 372
Index = 9
Left = 600
ScaleHeight = 348
ScaleWidth = 348
TabIndex = 18
Tag = "9"
Top = 3720
Width = 372
End
Begin PictureBox BColr
BackColor = &H00808080&
DragIcon = MWTERM.FRX:1810
Height = 372
Index = 8
Left = 240
ScaleHeight = 348
ScaleWidth = 348
TabIndex = 17
Tag = "8"
Top = 3720
Width = 372
End
Begin PictureBox BColr
BackColor = &H00C0C0C0&
DragIcon = MWTERM.FRX:1B12
Height = 372
Index = 7
Left = 2760
ScaleHeight = 348
ScaleWidth = 348
TabIndex = 16
Tag = "7"
Top = 3360
Width = 372
End
Begin PictureBox BColr
BackColor = &H000040C0&
DragIcon = MWTERM.FRX:1E14
Height = 372
Index = 6
Left = 2400
ScaleHeight = 348
ScaleWidth = 348
TabIndex = 15
Tag = "6"
Top = 3360
Width = 372
End
Begin PictureBox BColr
BackColor = &H00800080&
DragIcon = MWTERM.FRX:2116
Height = 372
Index = 5
Left = 2040
ScaleHeight = 348
ScaleWidth = 348
TabIndex = 14
Tag = "5"
Top = 3360
Width = 372
End
Begin PictureBox BColr
BackColor = &H00000080&
DragIcon = MWTERM.FRX:2418
Height = 372
Index = 4
Left = 1680
ScaleHeight = 348
ScaleWidth = 348
TabIndex = 13
Tag = "4"
Top = 3360
Width = 372
End
Begin PictureBox BColr
BackColor = &H00808000&
DragIcon = MWTERM.FRX:271A
Height = 372
Index = 3
Left = 1320
ScaleHeight = 348
ScaleWidth = 348
TabIndex = 12
Tag = "3"
Top = 3360
Width = 372
End
Begin PictureBox BColr
BackColor = &H00008000&
DragIcon = MWTERM.FRX:2A1C
Height = 372
Index = 2
Left = 960
ScaleHeight = 348
ScaleWidth = 348
TabIndex = 11
Tag = "2"
Top = 3360
Width = 372
End
Begin PictureBox BColr
BackColor = &H00000000&
DragIcon = MWTERM.FRX:2D1E
Height = 372
Index = 0
Left = 240
ScaleHeight = 348
ScaleWidth = 348
TabIndex = 10
Tag = "0"
Top = 3360
Width = 372
End
Begin PictureBox BColr
BackColor = &H00800000&
DragIcon = MWTERM.FRX:3020
Height = 372
Index = 1
Left = 600
ScaleHeight = 348
ScaleWidth = 348
TabIndex = 9
Tag = "1"
Top = 3360
Width = 372
End
Begin CheckBox chkBold
Caption = "B&old"
Height = 252
Left = 4920
TabIndex = 4
Top = 360
Width = 852
End
Begin Label Label1
Caption = "Drag and Drop Colors:"
Height = 252
Index = 8
Left = 240
TabIndex = 3
Top = 2520
Width = 2292
End
Begin Label Label1
Caption = "S&le:"
Height = 252
Index = 7
Left = 240
TabIndex = 32
Top = 840
Width = 852
End
Begin Label Label1
Caption = "Scrollback &Rows:"
Height = 252
Index = 6
Left = 3840
TabIndex = 8
Top = 1560
Width = 1572
End
Begin Label Label1
Caption = "Screen F&ilter"
Height = 252
Index = 5
Left = 3840
TabIndex = 7
Top = 2280
Width = 1812
End
Begin Label Label1
Alignment = 1 'Right Justify
Caption = "&Fore:"
Height = 252
Index = 4
Left = 1680
TabIndex = 6
Top = 2880
Width = 612
End
Begin Label Label1
Alignment = 1 'Right Justify
Caption = "&Back:"
Height = 252
Index = 3
Left = 240
TabIndex = 5
Top = 2880
Width = 612
End
Begin Label Label1
Caption = "Font &Size:"
Height = 252
Index = 2
Left = 3840
TabIndex = 2
Top = 120
Width = 972
End
Begin Label Label1
Caption = "Font &Name:"
Height = 252
Index = 1
Left = 240
TabIndex = 1
Top = 120
Width = 1092
End
Begin Label Label1
Caption = "&Emulation:"
Height = 252
Index = 0
Left = 3840
TabIndex = 0
Top = 840
Width = 1092
End
End
Option Explicit
'-- ModemWare Copyright (c) 1992 - 1994 Crescent Software.
' Written by Carl Franklin with help from and thanks to Bill Conley.
'001 10/17/94 - Fixed Invalid Property error when setting Comm1.FontBold
' to the chkBold check box.
Sub BColr_MouseDown (Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
BColr(Index).Drag
End Sub
Sub cbEmulation_LostFocus ()
If cbEmulation.ListIndex >= 0 Then
MW_Global_Comm1.Emulation = cbEmulation.ListIndex + 1
Comm1.Emulation = cbEmulation.ListIndex + 1
End If
End Sub
Sub cbFontName_Click ()
If cbFontName.ListIndex >= 0 Then
Comm1.FontName = cbFontName.List(cbFontName.ListIndex)
End If
End Sub
Sub cbFontName_LostFocus ()
If cbFontName.ListIndex >= 0 Then
MW_Global_Comm1.FontName = cbFontName.List(cbFontName.ListIndex)
Comm1.FontName = MW_Global_Comm1.FontName
chkBold.Value = Abs(Comm1.FontBold)
Comm1.Text = ""
Comm1.Disp = "Font Test"
End If
End Sub
Sub cbScreenFilter_LostFocus ()
If cbScreenFilter.ListIndex >= 0 Then
Comm1.ColorFilter = cbScreenFilter.ListIndex
MW_Global_Comm1.ColorFilter = cbScreenFilter.ListIndex
Comm1.Text = ""
Comm1.Disp = "Font Test"
End If
End Sub
Sub chkBold_Click ()
If chkBold.Value Then
Comm1.FontBold = True
Else
Comm1.FontBold = False
End If
End Sub
Sub cmdCancel_Click ()
Tag = ""
Hide
End Sub
Sub cmdOK_Click ()
Dim Temp$
MW_Global_Comm1.FontName = Comm1.FontName
MW_Global_Comm1.FontSize = Comm1.FontSize
MW_Global_Comm1.FontBold = Comm1.FontBold
MW_Global_Comm1.Emulation = Comm1.Emulation
MW_Global_Comm1.ScrollRows = Val(tbScrollRows.Text)
MW_Global_Comm1.ColorFilter = Comm1.ColorFilter
MW_Global_Comm1.BackColor = Comm1.BackColor
MW_Global_Comm1.ForeColor = Comm1.ForeColor
Temp$ = MW_Global_Comm1.Text
MW_Global_Comm1.Text = ""
Do
If Right$(Temp$, 2) = MW_CR$ + MW_LF$ Then
Temp$ = Left$(Temp$, Len(Temp$) - 2)
Else
Temp$ = Temp$ + MW_CR$ + MW_LF$
MW_Global_Comm1.Disp = Temp$
Exit Do
End If
Loop
Tag = "X"
Hide
End Sub
Sub Form_Activate ()
cbFontName.Text = MW_Global_Comm1.FontName
Comm1.FontName = MW_Global_Comm1.FontName
tbFontSize.Text = Str$(MW_Global_Comm1.FontSize)
Comm1.FontSize = MW_Global_Comm1.FontSize + .1
pbBackColor.BackColor = BColr(MW_Global_Comm1.BackColor).BackColor
pbForeColor.BackColor = BColr(MW_Global_Comm1.ForeColor).BackColor
Comm1.BackColor = MW_Global_Comm1.BackColor
Comm1.ForeColor = MW_Global_Comm1.ForeColor
chkBold.Value = Abs(MW_Global_Comm1.FontBold)
tbScrollRows.Text = Trim$(Str$(MW_Global_Comm1.ScrollRows))
Comm1.Text = ""
Comm1.Disp = "Font Test"
End Sub
Sub Form_Load ()
Dim I As Integer, Fonts As Integer
CenterForm Me
'-- Populate the FontName combo box.
Fonts = Screen.FontCount - 1
If Fonts > 150 Then Fonts = 150
For I = 0 To Fonts - 1
cbFontName.AddItem Screen.Fonts(I)
Next
'-- Populate the Emulation combo box.
cbEmulation.AddItem "TTY"
cbEmulation.AddItem "ANSI-BBS"
cbEmulation.AddItem "VT-52"
cbEmulation.AddItem "VT-100"
cbEmulation.ListIndex = MW_Global_Comm1.Emulation - 1
cbEmulation.Text = cbEmulation.List(MW_Global_Comm1.Emulation - 1)
'-- Populate the Screen Filter combo box.
cbScreenFilter.AddItem "Color"
cbScreenFilter.AddItem "Gray Scale"
cbScreenFilter.AddItem "Monochrome"
cbScreenFilter.Text = "Color"
End Sub
Sub pbBackColor_DragDrop (Source As Control, X As Single, Y As Single)
pbBackColor.BackColor = BColr(Source.Index).BackColor
Comm1.BackColor = Source.Index
Comm1.Text = ""
Comm1.Disp = "Font Test"
End Sub
Sub pbForeColor_DragDrop (Source As Control, X As Single, Y As Single)
pbForeColor.BackColor = BColr(Source.Index).BackColor
Comm1.ForeColor = Source.Index
Comm1.Text = ""
Comm1.Disp = "Font Test"
End Sub
Sub tbFontSize_Change ()
Dim NewSize!
NewSize! = Val(tbFontSize.Text)
If NewSize! > 0 Then
Comm1.FontSize = Val(tbFontSize.Text)
chkBold.Value = Abs(Comm1.FontBold)
Comm1.Text = ""
Comm1.Disp = "Font Test"
End If
End Sub
Sub tbScrollRows_Change ()
Dim BytesPerRow As Integer, MaxRows As Integer, NumRows As Integer
BytesPerRow = MW_Global_Comm1.Columns * 2
MaxRows = 65535 \ BytesPerRow
NumRows = Val(tbScrollRows.Text)
If NumRows > MaxRows Then
MsgBox "You can only allocate 64K for a scrollback buffer (Rows * Columns * 2)"
End If
End Sub