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

📄 form1.frm

📁 好用啊
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "弹出式菜单演示"
   ClientHeight    =   2460
   ClientLeft      =   165
   ClientTop       =   735
   ClientWidth     =   3960
   LinkTopic       =   "Form1"
   ScaleHeight     =   2460
   ScaleWidth      =   3960
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton Command1 
      Caption         =   "弹出菜单"
      Height          =   495
      Left            =   240
      TabIndex        =   0
      Top             =   240
      Width           =   1095
   End
   Begin VB.Menu mnuFile 
      Caption         =   "文件(&F)"
      Begin VB.Menu mnuFileNew 
         Caption         =   "新建(&N)"
         Shortcut        =   ^N
      End
      Begin VB.Menu mnuFileOpen 
         Caption         =   "打开(&O)"
         Shortcut        =   ^O
      End
      Begin VB.Menu mnuFileSave 
         Caption         =   "保存(&S)"
         Enabled         =   0   'False
         Shortcut        =   ^S
      End
      Begin VB.Menu mnuFileSeparator 
         Caption         =   "-"
      End
      Begin VB.Menu mnuFileExit 
         Caption         =   "退出(&E)"
      End
   End
   Begin VB.Menu mnuDraw 
      Caption         =   "绘图(&D)"
      Begin VB.Menu mnuDrawLine 
         Caption         =   "画线(&L)"
         Begin VB.Menu mnuDrawLineSolid 
            Caption         =   "实线(&S)"
         End
         Begin VB.Menu mnuDrawLineDashed 
            Caption         =   "虚线(&D)"
         End
      End
      Begin VB.Menu mnuDrawCircle 
         Caption         =   "画圆(&C)"
         Begin VB.Menu mnuDrawCircleOval 
            Caption         =   "椭圆(&O)"
         End
         Begin VB.Menu mnuDrawCircleCircle 
            Caption         =   "圆(&C)"
            Checked         =   -1  'True
         End
         Begin VB.Menu mnuDrawCirclArc 
            Caption         =   "圆弧(&A)"
         End
      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 Command1_Click()
    Form1.PopupMenu mnuDrawCircle
End Sub

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button = 2 Then
        Form1.PopupMenu mnuFile, 10, , , mnuFileOpen
        End If
End Sub

Private Sub mnuDrawCircleCircle_Click()
    Dim intStartX As Integer
    Dim intStartY As Integer
    Dim intRadius As Integer
    Dim strInput As String
    strInput = InputBox("请输入圆心坐标:x,y。", "圆心坐标", "0,0")
    intStartX = Val(Left(strInput, InStr(strInput, ",")))
    intStartY = Val(Right(strInput, Len(strInput) - InStr(strInput, ",")))
    strInput = InputBox("请输入半径:r。", "半径", "200")
    intRadius = Val(strInput)
    Circle (intStartX, intStartY), intRadius
End Sub

Private Sub mnuFileNew_Click()
    mnuFileSeparator.Caption = "fsaf"
End Sub

Private Sub mnuFileSeparator_Click()
End
End Sub

⌨️ 快捷键说明

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