附录程序清单及注释
程序清单6.1
Option Explicit
Dim FileName As String '文件名,用于打开、保存文件
Dim UndoString As String '用于 Undo 操作
Dim UndoNew As String '用于 Undo 操作
Private Sub ImgUndoDisable()
'禁用“Undo”按钮
UndoString =
UndoNew =
ImgUndo.Enabled = False
ImgUndo.Picture = ImageDisable.ListImages(Undo).Picture
End Sub
Private Sub ImgUndoEnable()
'有效“Undo”按钮
ImgUndo.Enabled = True
ImgUndo.Picture = ImageUp.ListImages(Undo).Picture
End Sub
Private Sub Check_ImgPaste()
'设置粘贴按钮
If Len(Clipboard.GetText) 0 Then
ImgPaste.Enabled = True
ImgPaste.Picture = ImageUp.ListImages(Paste).Picture
Else
ImgPaste.Enabled = False
ImgPaste.Picture = ImageDisable.ListImages(Paste).Picture
End If
End Sub
Private Sub Check_ImgCutCopy()
'设置剪切、复制按钮
If Text1.SelLength 0 Then
ImgCut.Enabled = True
ImgCut.Picture = ImageUp.ListI