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

📄 form1.frm

📁 用VB实现的小型信息系统课程设计,希望对大家有帮助
💻 FRM
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form frmanother 
   Caption         =   "Form1"
   ClientHeight    =   5985
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   9510
   LinkTopic       =   "Form1"
   ScaleHeight     =   5985
   ScaleWidth      =   9510
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command6 
      Caption         =   "退出"
      Height          =   495
      Left            =   5640
      TabIndex        =   20
      Top             =   4920
      Width           =   855
   End
   Begin VB.TextBox Text4 
      Height          =   855
      Left            =   2280
      MultiLine       =   -1  'True
      TabIndex        =   19
      Text            =   "Form1.frx":0000
      Top             =   3960
      Width           =   2175
   End
   Begin VB.HScrollBar HScroll1 
      Height          =   255
      Left            =   2280
      TabIndex        =   16
      Top             =   840
      Width           =   1215
   End
   Begin MSComCtl2.DTPicker DTPicker2 
      Height          =   495
      Left            =   6240
      TabIndex        =   15
      Top             =   2400
      Width           =   1455
      _ExtentX        =   2566
      _ExtentY        =   873
      _Version        =   393216
      Format          =   19988481
      CurrentDate     =   38362
   End
   Begin MSComCtl2.DTPicker DTPicker1 
      Height          =   495
      Left            =   2280
      TabIndex        =   14
      Top             =   2400
      Width           =   1455
      _ExtentX        =   2566
      _ExtentY        =   873
      _Version        =   393216
      Format          =   19988481
      CurrentDate     =   38362
   End
   Begin VB.CommandButton Command5 
      Caption         =   "确定删除"
      Height          =   495
      Left            =   4440
      TabIndex        =   13
      Top             =   4920
      Width           =   855
   End
   Begin VB.CommandButton Command4 
      Caption         =   "成员信息"
      Height          =   735
      Left            =   7560
      TabIndex        =   12
      Top             =   4800
      Width           =   1335
   End
   Begin VB.CommandButton Command3 
      Caption         =   "删除标记"
      Height          =   495
      Left            =   3240
      TabIndex        =   11
      Top             =   4920
      Width           =   855
   End
   Begin VB.CommandButton Command2 
      Caption         =   "保存"
      Height          =   495
      Left            =   2040
      TabIndex        =   10
      Top             =   4920
      Width           =   855
   End
   Begin VB.CommandButton Command1 
      Caption         =   "新建"
      Height          =   495
      Left            =   840
      TabIndex        =   9
      Top             =   4920
      Width           =   855
   End
   Begin VB.TextBox Text3 
      Height          =   375
      Left            =   2280
      MultiLine       =   -1  'True
      TabIndex        =   8
      Text            =   "Form1.frx":0006
      Top             =   3240
      Width           =   5775
   End
   Begin VB.TextBox Text2 
      Height          =   495
      Left            =   6240
      TabIndex        =   7
      Text            =   "Text2"
      Top             =   1560
      Width           =   1455
   End
   Begin VB.TextBox Text1 
      Height          =   495
      Left            =   2280
      TabIndex        =   6
      Text            =   "Text1"
      Top             =   1560
      Width           =   1455
   End
   Begin VB.Label Label8 
      AutoSize        =   -1  'True
      Caption         =   "详细路程:"
      Height          =   180
      Left            =   1080
      TabIndex        =   18
      Top             =   3960
      Width           =   900
   End
   Begin VB.Label Label7 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      Caption         =   "社团信息"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   300
      Left            =   4110
      TabIndex        =   17
      Top             =   120
      Width           =   1275
   End
   Begin VB.Label Label6 
      Alignment       =   2  'Center
      Caption         =   "终止时间:"
      Height          =   495
      Left            =   4920
      TabIndex        =   5
      Top             =   2400
      Width           =   1095
   End
   Begin VB.Label Label5 
      Alignment       =   2  'Center
      Caption         =   "开始时间:"
      Height          =   375
      Left            =   960
      TabIndex        =   4
      Top             =   2400
      Width           =   975
   End
   Begin VB.Label Label4 
      Alignment       =   2  'Center
      Caption         =   "终点:"
      Height          =   255
      Left            =   4920
      TabIndex        =   3
      Top             =   1680
      Width           =   975
   End
   Begin VB.Label Label3 
      Alignment       =   2  'Center
      Caption         =   "介绍:"
      Height          =   255
      Left            =   1080
      TabIndex        =   2
      Top             =   3240
      Width           =   855
   End
   Begin VB.Label Label2 
      Alignment       =   2  'Center
      Caption         =   "始发地点:"
      Height          =   375
      Left            =   960
      TabIndex        =   1
      Top             =   1560
      Width           =   1095
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      Caption         =   "社团号:"
      Height          =   255
      Left            =   960
      TabIndex        =   0
      Top             =   840
      Width           =   975
   End
End
Attribute VB_Name = "frmanother"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private she As shes
Private IntCurrentRecord As Integer
Private IntLastRecord As Integer
Private IntFileNum As Integer
Private Sub Command1_Click()
   she.start = Text1.Text
   she.end = Text2.Text
   she.stime = DTPicker1.Value
   she.etime = DTPicker2.Value
   she.other = Text3.Text
   she.road = Text4.Text
   IntLastRecord = IntLastRecord + 1
   Put #IntFileNum, IntLastRecord, she
   HScroll1.Max = IntLastRecord
   HScroll1.Value = HScroll1.Max
   Label1.Caption = "社团号:" & IntCurrentRecord
  
End Sub

Private Sub Command2_Click()
     she.start = Text1.Text
     she.end = Text2.Text
     she.stime = DTPicker1.Value
     she.etime = DTPicker2.Value
     she.other = Text3.Text
     she.road = Text4.Text
     Put #IntFileNum, IntCurrentRecord, she
     MsgBox "保存成功"
     
End Sub


Private Sub Command3_Click()
    Text1.Text = "*" & Text1.Text
    she.start = Text1.Text
    Put #IntFileNum, IntCurrentRecord, she
End Sub
Private Sub Command4_Click()
frmMain.Show
End Sub

Private Sub Command5_Click()
Dim intCounter1, intCounter2 As Integer
    Dim inttempFileNum As Integer
    inttempFileNum = FreeFile()
    Open App.Path & "\temp.txt" For Random As #inttempFileNum Len = Len(she)
    intCounter2 = 1
    For intCounter1 = 1 To IntLastRecord
       Get #IntFileNum, intCounter1, she
    
    If Left$(she.start, 1) <> "*" Then
    Put inttempFileNum, intCounter2, she
    intCounter2 = intCounter2 + 1
    End If
    Next intCounter1
    Close #inttempFileNum
    Close #IntFileNum
    Kill (App.Path & "\she num.txt")
    Name App.Path & "\temp.txt" As App.Path & "\she num.txt"
    MsgBox "已删除"
    Unload Me
    
End Sub

Private Sub Command6_Click()
Unload Me
End Sub

Private Sub Form_Load()
IntFileNum = FreeFile()
Open App.Path & "\she num.txt" For Random As #IntFileNum Len = Len(she)
IntLastRecord = LOF(1) / Len(she)
Label1.Caption = "社团号:" & 1
IntCurrentRecord = 1
If LOF(1) <> 0 Then
Get #IntFileNum, IntCurrentRecord, she
Text1.Text = she.start
Text2.Text = she.end
DTPicker1.Value = she.stime
DTPicker2.Value = she.etime
Text3.Text = she.other
Text4.Text = she.road
End If
HScroll1.Min = 1
HScroll1.Max = IntLastRecord
HScroll1.LargeChange = 5
HScroll1.SmallChange = 1
HScroll1.Value = 1


End Sub

Private Sub HScroll1_Change()
IntCurrentRecord = HScroll1.Value
Get #IntFileNum, IntCurrentRecord, she
Text1.Text = she.start
Text2.Text = she.end
DTPicker1.Value = she.stime
DTPicker2.Value = she.etime
Text3.Text = she.other
Text4.Text = she.road
Label1.Caption = "社团号:" & IntCurrentRecord
End Sub

⌨️ 快捷键说明

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