6.frm

来自「上传的包含两个文件」· FRM 代码 · 共 96 行

FRM
96
字号
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "时间/日期显示"
   ClientHeight    =   3090
   ClientLeft      =   165
   ClientTop       =   855
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3090
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.Menu MnuDisplay 
      Caption         =   "文件(&F)"
      Begin VB.Menu mnudate 
         Caption         =   "日期(&D)"
         Shortcut        =   ^D
      End
      Begin VB.Menu Mnutime 
         Caption         =   "时间(&T)"
         Shortcut        =   ^T
      End
      Begin VB.Menu Mnu13 
         Caption         =   "-"
      End
      Begin VB.Menu Munexit 
         Caption         =   "退出(&X)"
         Shortcut        =   ^X
      End
   End
   Begin VB.Menu Mnuhelp 
      Caption         =   "帮助(&H)"
      Begin VB.Menu Mnuabout 
         Caption         =   "关于(&A)"
      End
   End
   Begin VB.Menu mnucolor 
      Caption         =   "颜色"
      Visible         =   0   'False
      Begin VB.Menu mnured 
         Caption         =   "红色"
      End
      Begin VB.Menu mnuyellow 
         Caption         =   "黄色"
      End
      Begin VB.Menu mnublue 
         Caption         =   "蓝色"
      End
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_MouseDown(button As Integer, shift As Integer, x As Single, y As Single)
If button = 2 Then PopupMenu mnucolor, , , , mnured
End Sub

Private Sub Mnuabout_Click()
MsgBox "作者: 刘豪" + Chr(10) + Chr(10) + "2006年3月26日", , "关于"
End Sub

Private Sub mnublue_Click()
ForeColor = RGB(0, 0, 255)
mnured.Checked = False
mnuyellow.Checked = False
mnublue.Checked = True
End Sub

Private Sub mnudate_Click()
Print "今天是:" & Year(Date) & "年" & Month(Date) & "月" & Day(Date) & "日"

End Sub

Private Sub mnured_Click()
ForeColor = vbRed
mnured.Checked = True
mnuyellow.Checked = fasle
mnublue.Checked = False
End Sub

Private Sub Mnutime_Click()
Print "现在是北京时间:   " & Time
End Sub

Private Sub mnuyellow_Click()
ForeColor = RGB(255, 255, 0)
mnured.Checked = False
mnuyellow.Checked = True
mnublue.Checked = False
End Sub

Private Sub Munexit_Click()
End
End Sub

⌨️ 快捷键说明

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