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

📄 猴子吃桃问题解答.frm

📁 猴子吃桃的问题: 此程序是用递归做出来的
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Form1"
   ClientHeight    =   2325
   ClientLeft      =   45
   ClientTop       =   360
   ClientWidth     =   4530
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MousePointer    =   99  'Custom
   ScaleHeight     =   2325
   ScaleWidth      =   4530
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox Text1 
      Height          =   495
      Left            =   2040
      TabIndex        =   1
      Top             =   1680
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      Caption         =   "解答"
      Height          =   495
      Left            =   120
      TabIndex        =   0
      Top             =   1680
      Width           =   1695
   End
   Begin VB.Label Label2 
      Caption         =   $"猴子吃桃问题解答.frx":0000
      Height          =   1335
      Left            =   120
      TabIndex        =   3
      Top             =   120
      Width           =   4215
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "http://814810.tomore.com"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   -1  'True
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   180
      Left            =   120
      MouseIcon       =   "猴子吃桃问题解答.frx":00F3
      MousePointer    =   99  'Custom
      TabIndex        =   2
      Top             =   1440
      Width           =   2160
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'执行超链接的API函数
 Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
                    (ByVal hWnd As Long, _
                     ByVal lpOperation As String, _
                     ByVal lpFile As String, _
                     ByVal lpParameters As String, _
                     ByVal lpDirectory As String, _
                     ByVal nShowCmd As Long) As Long
                     
  Const SW_SHOW = 5

Function ss(ByVal i As Integer)
          ss = (i + 1) * 2
End Function
    
  Private Sub Command1_Click()
          Dim n As Integer, i As Integer
          n = 1
          For i = 9 To 1 Step -1
              n = ss(n)
          Next
          Text1.Text = n
  End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
     Label1.ForeColor = vbBlue
End Sub

Private Sub Label1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Label1.BorderStyle = 1
End Sub

Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Label1.ForeColor = vbRed
End Sub

Private Sub Label1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Label1.BorderStyle = 0
    ShellExecute Me.hWnd, "open", "http://814810.tomore.com", "", "", SW_SHOW
    Label1.ForeColor = vbBlue
End Sub

⌨️ 快捷键说明

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