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

📄 例5.frm

📁 在VB5环境下开发的VB程序集,窗体控件源代码.
💻 FRM
字号:
VERSION 5.00
Begin VB.Form FRM7_5_3 
   Caption         =   "Form1"
   ClientHeight    =   2670
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   6435
   BeginProperty Font 
      Name            =   "宋体"
      Size            =   14.25
      Charset         =   134
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form1"
   ScaleHeight     =   2670
   ScaleWidth      =   6435
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox Text2 
      Height          =   495
      Left            =   4200
      TabIndex        =   5
      Top             =   1680
      Width           =   1695
   End
   Begin VB.TextBox Text1 
      Height          =   495
      Left            =   1080
      TabIndex        =   3
      Top             =   1680
      Width           =   1335
   End
   Begin VB.HScrollBar HScroll1 
      Height          =   495
      LargeChange     =   5
      Left            =   240
      TabIndex        =   1
      Top             =   960
      Width           =   5895
   End
   Begin VB.Label Label3 
      Caption         =   "S="
      Height          =   495
      Left            =   3840
      TabIndex        =   4
      Top             =   1680
      Width           =   375
   End
   Begin VB.Label Label2 
      Caption         =   "n="
      Height          =   495
      Left            =   720
      TabIndex        =   2
      Top             =   1680
      Width           =   375
   End
   Begin VB.Label Label1 
      BackColor       =   &H00FFFFFF&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "求1--n的整数和S, n的值有滚动条的位置确定"
      Height          =   495
      Left            =   240
      TabIndex        =   0
      Top             =   240
      Width           =   5895
   End
End
Attribute VB_Name = "FRM7_5_3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub HScroll1_Change()
  Dim i As Integer
  Dim n As Integer, s As Long
  n = HScroll1.Value
  For i = 1 To n
    s = s + i
  Next i
  Text1 = n
  Text2 = s
End Sub
Private Sub HScroll1_Scroll()
  Dim i As Integer
  Dim n As Integer, s As Long
  n = HScroll1.Value
  For i = 1 To n
    s = s + i
  Next i
  Text1 = n
  Text2 = s
End Sub

⌨️ 快捷键说明

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