Wor打印程序代码.docVIP

  • 1
  • 0
  • 约6.37万字
  • 约 7页
  • 2017-06-13 发布于河南
  • 举报
Wor打印程序代码

MDI窗体程序代码 Option Explicit Public intChildNum As Integer 字窗体数 变量 Public intCaptionNum As Integer 变换标题名称 变量 Public blnSaveAA As Boolean 与strCaptionAA确定另存为操作完后不出现消息框可直接退出 Public strCaptionAA As String 用于确定另存为操作完后只有按本窗口关闭时有用并不出现消息框 Public blnSaveBB As Boolean 与strCaptionBB确定保存操作完后不出现消息框可直接退出 Public strCaptionBB As String 用于确定另存为操作完后只有按本窗口关闭时有用并不出现消息框 Private Sub MDIForm_Load() mnuWindow.Visible = False 开始时不显示窗体菜单 mnuFileSave.Visible = False 开始时不显示保存菜单 mnuFileSaveAnother.Visible = False 开始时不显示另存为菜单 mnuEditor.Visible = False 开始时不显示编辑菜单 mnuO.Visible = False 开始时不显示格式菜单 End Sub Private Sub mnuEditor_Click() If ActiveForm.ActiveControl.SelText = Then mnuEditorEdi(0).Enabled = False mnuEditorEdi(1).Enabled = False mnuEditorEdi(3).Enabled = False If Clipboard.GetText = Then mnuEditorEdi(2).Enabled = False ElseIf Clipboard.GetText Then mnuEditorEdi(2).Enabled = True End If ElseIf ActiveForm.ActiveControl.SelText Then mnuEditorEdi(0).Enabled = True mnuEditorEdi(1).Enabled = True mnuEditorEdi(3).Enabled = True If Clipboard.GetText = Then mnuEditorEdi(2).Enabled = False ElseIf Clipboard.GetText Then mnuEditorEdi(2).Enabled = True End If End If End Sub Private Sub mnuEditorEdi_Click(Index As Integer) Select Case Index Case 0 Clipboard.SetText ActiveForm.ActiveControl.SelText 剪切 ActiveForm.ActiveControl.SelText = Case 1 Clipboard.SetText ActiveForm.ActiveControl.SelText 复制 Case 2 ActiveForm.ActiveControl.SelText = Clipboard.GetText 粘贴 Case 3 ActiveForm.ActiveControl.SelText = 删除 End Select End Sub Private Sub mnuEditortTD_Click() Dim str1 As String Dim str2 As String str1 = Mid(ActiveForm.ActiveControl.Text, 1, Len(ActiveForm.ActiveControl.Text)) 原文本内容 str2 = Now 时间及日期 ActiveForm.ActiveControl.Text = st

文档评论(0)

1亿VIP精品文档

相关文档