⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 memoform.frm

📁 e-maill文件加密程序完整的源代码
💻 FRM
字号:
VERSION 5.00
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
Begin VB.Form MemoForm 
   Caption         =   "Compose a Memo to Encrypt to the Clipboard"
   ClientHeight    =   3900
   ClientLeft      =   1920
   ClientTop       =   2172
   ClientWidth     =   6012
   LinkTopic       =   "Form6"
   MinButton       =   0   'False
   ScaleHeight     =   3900
   ScaleWidth      =   6012
   ShowInTaskbar   =   0   'False
   Begin RichTextLib.RichTextBox MemoBox 
      Height          =   2808
      Left            =   0
      TabIndex        =   0
      Top             =   408
      Width           =   6012
      _ExtentX        =   10605
      _ExtentY        =   4953
      _Version        =   393217
      Enabled         =   -1  'True
      HideSelection   =   0   'False
      ScrollBars      =   2
      DisableNoScroll =   -1  'True
      AutoVerbMenu    =   -1  'True
      OLEDropMode     =   0
      TextRTF         =   $"MEMOFORM.frx":0000
   End
   Begin VB.CommandButton UnderlineFont 
      Caption         =   "U"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   7.8
         Charset         =   0
         Weight          =   400
         Underline       =   -1  'True
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   252
      Left            =   5160
      Style           =   1  'Graphical
      TabIndex        =   6
      TabStop         =   0   'False
      Top             =   75
      Width           =   372
   End
   Begin VB.CommandButton ItalicFont 
      Caption         =   "I"
      BeginProperty Font 
         Name            =   "Courier New"
         Size            =   10.2
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      Height          =   252
      Left            =   4680
      Style           =   1  'Graphical
      TabIndex        =   5
      TabStop         =   0   'False
      Top             =   75
      Width           =   372
   End
   Begin VB.CommandButton BoldFont 
      Caption         =   "B"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.6
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   252
      Left            =   4200
      Style           =   1  'Graphical
      TabIndex        =   4
      TabStop         =   0   'False
      Top             =   75
      Width           =   372
   End
   Begin VB.ComboBox MemoFontPoints 
      Height          =   288
      Left            =   3040
      Style           =   2  'Dropdown List
      TabIndex        =   3
      TabStop         =   0   'False
      Top             =   30
      Width           =   972
   End
   Begin VB.ComboBox MemoFontColor 
      CausesValidation=   0   'False
      Height          =   288
      ItemData        =   "MEMOFORM.frx":00C9
      Left            =   200
      List            =   "MEMOFORM.frx":00CB
      Style           =   2  'Dropdown List
      TabIndex        =   1
      TabStop         =   0   'False
      Top             =   30
      Width           =   972
   End
   Begin VB.ComboBox MemoFontName 
      CausesValidation=   0   'False
      Height          =   288
      Left            =   1200
      Sorted          =   -1  'True
      Style           =   2  'Dropdown List
      TabIndex        =   2
      TabStop         =   0   'False
      Top             =   30
      Width           =   1812
   End
   Begin VB.CommandButton CloseMemo 
      Caption         =   "Close "
      Height          =   372
      Left            =   4560
      TabIndex        =   8
      Top             =   3360
      Width           =   1212
   End
   Begin VB.CommandButton ClearMemo 
      Caption         =   "Clear Memo"
      Height          =   372
      Left            =   3120
      TabIndex        =   7
      Top             =   3360
      Width           =   1212
   End
End
Attribute VB_Name = "MemoForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' StealthMail - MemoForm.FRM
' Copyright Patterson Programming, 1996-1999

Dim ResetFocusAllowed As Integer, ButtonColor As Long
Dim MemoBoxBold%, MemoBoxItalic%, MemoBoxUL%

Sub Form_Load()

    MemoForm.Left = (Screen.Width - MemoForm.Width) / 2

    MemoBox.TextRTF = MemoText
    ResetFocusAllowed = 0

    '* populate ComboBoxes
    MemoFontColor.AddItem "Black"
    MemoFontColor.AddItem "Blue"
    MemoFontColor.AddItem "Red"
    MemoFontColor.AddItem "Green"
    MemoFontColor.AddItem "Magenta"
    MemoFontColor.ListIndex = 0

    For i% = 0 To Screen.FontCount - 1
        MemoFontName.AddItem Screen.Fonts(i%)
    Next
    If FontNameIndex% > Screen.FontCount - 1 Then
        FontNameIndex% = 0
    End If
    '* set selected
    MemoFontName.ListIndex = FontNameIndex%
    MemoBox.SelFontName = MemoFontName.Text

    For i% = 8 To 72 Step 2
        MemoFontPoints.AddItem i%
    Next
    '* set selected
    MemoFontPoints.ListIndex = FontPointsIndex%
    MemoBox.SelFontSize = MemoFontPoints

    MemoBox.SelColor = vbBlack
    ButtonColor = BoldFont.BackColor

    ResetFocusAllowed = -1

End Sub

Private Sub Form_Unload(Cancel As Integer)
    MemoText = MemoForm.MemoBox.TextRTF
End Sub

Private Sub CloseMemo_Click()
    FontNameIndex% = MemoFontName.ListIndex
    FontPointsIndex% = MemoFontPoints.ListIndex
    Unload MemoForm
End Sub

Private Sub ClearMemo_Click()

   MemoBox.TextRTF = Space$(Len(MemoBox.TextRTF))
   MemoBox.TextRTF = ""
   MemoText = Space$(Len(MemoText))
   MemoText = ""

   MemoFontColor.ListIndex = 0
   MemoFontName.ListIndex = FontNameIndex%
   MemoBox.SelFontName = MemoFontName.Text
   MemoFontPoints.ListIndex = FontPointsIndex%
   MemoBox.SelFontSize = MemoFontPoints
   MemoBoxBold% = 0
   MemoBox.SelBold = 0
   BoldFont.BackColor = ButtonColor
   MemoBoxItalic% = 0
   MemoBox.SelItalic = 0
   ItalicFont.BackColor = ButtonColor
   MemoBoxUL% = 0
   MemoBox.SelUnderline = 0
   UnderlineFont.BackColor = ButtonColor
   MemoBox.SetFocus
   MemoBox.SelIndent = 0

End Sub

Sub MemoFontName_Click()

    FontNameIndex% = MemoFontName.ListIndex
    MemoBox.SelFontName = MemoFontName
    ResetFocus

End Sub

Sub MemoFontPoints_Click()

    FontPointsIndex% = MemoFontPoints.ListIndex
    MemoBox.SelFontSize = MemoFontPoints
    ResetFocus

End Sub

Sub MemoFontColor_Click()

    Select Case MemoFontColor.ListIndex
        Case 0
            MemoBox.SelColor = vbBlack
        Case 1
            MemoBox.SelColor = vbBlue
        Case 2
            MemoBox.SelColor = vbRed
        Case 3
            MemoBox.SelColor = vbGreen
        Case 4
            MemoBox.SelColor = vbMagenta
    End Select
    ResetFocus

End Sub

Private Sub BoldFont_Click()

    If MemoBoxBold% = 0 Then
        MemoBoxBold% = -1
        MemoBox.SelBold = -1
        ButtonColor = BoldFont.BackColor
        BoldFont.BackColor = vbWindowBackground
    Else
        MemoBoxBold% = 0
        MemoBox.SelBold = 0
        BoldFont.BackColor = ButtonColor
    End If
    ResetFocus

End Sub

Private Sub ItalicFont_Click()

    If MemoBoxItalic% = 0 Then
        MemoBoxItalic% = -1
        MemoBox.SelItalic = -1
        ButtonColor = ItalicFont.BackColor
        ItalicFont.BackColor = vbWindowBackground
    Else
        MemoBoxItalic% = 0
        MemoBox.SelItalic = 0
        ItalicFont.BackColor = ButtonColor
    End If
    ResetFocus

End Sub

Private Sub UnderlineFont_Click()

    If MemoBoxUL% = 0 Then
        MemoBoxUL% = -1
        MemoBox.SelUnderline = -1
        ButtonColor = UnderlineFont.BackColor
        UnderlineFont.BackColor = vbWindowBackground
    Else
        MemoBoxUL% = 0
        MemoBox.SelUnderline = 0
        UnderlineFont.BackColor = ButtonColor
    End If
    ResetFocus

End Sub

Sub ResetFocus()

    If ResetFocusAllowed = -1 Then
        MemoBox.SetFocus
    End If

End Sub

Private Sub Form_Resize()

    MemoBox.Top = 408
    MemoBox.Width = MemoForm.Width - 96
    MemoBox.Height = MemoForm.Height - 1476
    CloseMemo.Left = MemoForm.Width - CloseMemo.Width - 336
    ClearMemo.Left = CloseMemo.Left - ClearMemo.Width - 228
    CloseMemo.Top = MemoForm.Height - CloseMemo.Height - 552
    ClearMemo.Top = CloseMemo.Top

End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -