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

📄 a_start.frm

📁 用VB编写的家庭理财程序
💻 FRM
字号:
VERSION 5.00
Begin VB.Form A_Start 
   BackColor       =   &H00C0C0FF&
   BorderStyle     =   3  'Fixed Dialog
   ClientHeight    =   7110
   ClientLeft      =   45
   ClientTop       =   45
   ClientWidth     =   9510
   ClipControls    =   0   'False
   ControlBox      =   0   'False
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   7110
   ScaleWidth      =   9510
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Command1 
      Caption         =   "继  续"
      Height          =   375
      Left            =   6000
      TabIndex        =   5
      Top             =   6000
      Width           =   1215
   End
   Begin VB.CommandButton Command2 
      Caption         =   "退  出"
      Height          =   375
      Left            =   7440
      TabIndex        =   4
      Top             =   6000
      Width           =   1215
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H00FFFF00&
      Height          =   4920
      Left            =   720
      TabIndex        =   0
      Top             =   600
      Width           =   8000
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "沈阳市军事体育陆上运动学校"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H000000C0&
         Height          =   210
         Left            =   3720
         TabIndex        =   6
         Top             =   3960
         Width           =   2940
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "乒乓球赛管理程序"
         BeginProperty Font 
            Name            =   "隶书"
            Size            =   24
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H000000FF&
         Height          =   495
         Left            =   3240
         TabIndex        =   3
         Top             =   840
         Width           =   3975
      End
      Begin VB.Image imgLogo 
         Height          =   2385
         Left            =   600
         Picture         =   "A_Start.frx":0000
         Stretch         =   -1  'True
         Top             =   795
         Width           =   2055
      End
      Begin VB.Label lblWarning 
         BackStyle       =   0  'Transparent
         Caption         =   "2005.01.05"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00008000&
         Height          =   315
         Left            =   4680
         TabIndex        =   1
         Top             =   2880
         Width           =   1245
      End
      Begin VB.Label lblVersion 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Version 2.10 "
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00C00000&
         Height          =   240
         Left            =   4440
         TabIndex        =   2
         Top             =   2160
         Width           =   1770
      End
   End
End
Attribute VB_Name = "A_Start"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

'     ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
'     ┃         F_Start        系统启动窗口                    ┃
'     ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

Option Explicit
'


Private Sub Form_Load()

    Me.Height = 7200
    Me.Width = 9600
    
    blnTc = False
    StrUjb = ""
    Label1 = ""
    Label2 = ""

End Sub

Private Sub Form_Activate()
    If blnTc = False And Command1.Visible Then
       Call P_init                                              ' 创建数据库-工作表
       Command1.SetFocus
    Else
       Command2.Visible = True
       Command2.SetFocus
    End If
    
'Form01.Show  ' 启动管理员菜单   !!!!
'FormA0.Show
'FormD6.Show
'Unload Me
    
End Sub

Private Sub Form_Click()                                         ' 鼠标单击 Form
    Call Command1_Click
End Sub

Private Sub Frame1_Click()                                       ' 鼠标单击 Frame
    Call Command1_Click
End Sub

Private Sub Command1_Click()                                     ' 继续
    If blnTc = False Then
       Command1.Visible = False
       Command2.Visible = False
       B_Login.Show                                              ' 登录
    End If
End Sub

Private Sub Command2_Click()                                     ' 结束
    Unload Me
    End
End Sub

Private Sub P_init()                                             ' 初始化
        
    Call myP_mkDir(App.Path & StrDir)                            ' 建立文件夹
       
    Db_fN2 = App.Path & StrDir & Db_Name2
       If Dir(Db_fN2) = "" Then
          Set MyDb2 = CreateDatabase(Db_fN2, dbLangGeneral)      ' 建立数据库 T
              MyDb2.Close: Set MyDb2 = Nothing
       End If

    If myF_ConnT(Db_fN2) = False Then Unload Me: Exit Sub        ' 连接库 T
    
    StrT3 = "T_yf"
    If myF_ExistT(StrT3) < 0 Then                                ' 药费报销表
       StrSQL = "CREATE TABLE " & StrT3 & " ( " & _
                "  Bh short,Xm text(6),Sj text(22),Je single," & _
                "  Sl short,Bx text(1),Rq text(10),Bz text(30) )"
       cnnTce.Execute StrSQL, , adCmdText
    End If
    
    StrT2 = "T_zm"
    If myF_ExistT(StrT2) < 0 Then                                ' 帐目表
       StrSQL = "CREATE TABLE " & StrT2 & " ( " & _
                "  Rq text(10),Xh short," & _
                "  Sz text(1),Lb text(1),Mc text(40)," & _
                "  Dj single,Sl short,Sr single,Zc single,Ye single," & _
                "  Bh short,Bz text(30) )"
       cnnTce.Execute StrSQL, , adCmdText
    End If
      
    StrT1 = "T_tm"
    If myF_ExistT(StrT1) < 0 Then                                ' 条目表
       StrSQL = "CREATE TABLE " & StrT1 & "( " & _
                "  Dm text(5),Xh text(3),Mc text(40),Jc text(20),Bz text(20) )"
       cnnTce.Execute StrSQL, , adCmdText
       StrShm = "家庭理财"
       StrMsg = StrT1 & "( Dm,Xh,Mc,Jc,Bz) VALUES "
       StrSQL = "INSERT into " & StrMsg & "('Mc001','101','" & StrShm & "','" & StrShm & "',' ')"
              cnnTce.Execute StrSQL, , adCmdText
       StrSQL = "INSERT into " & StrMsg & "('Mc002','102','“希望杯”',' ',' ')"
              cnnTce.Execute StrSQL, , adCmdText
       StrSQL = "INSERT into " & StrMsg & "('Mc003','103','沈阳大学信息工程学院',' ',' ')"
              cnnTce.Execute StrSQL, , adCmdText
       StrSQL = "INSERT into " & StrMsg & "('Kl001','101','AAAA','8888','1')"     ' 一级口令
              cnnTce.Execute StrSQL, , adCmdText
       StrSQL = "INSERT into " & StrMsg & "('Kl002','102','User','6666','2')"     ' 二级口令
              cnnTce.Execute StrSQL, , adCmdText
       StrSQL = "INSERT into " & StrMsg & "('Lb001','101','工资','s','A')"
              cnnTce.Execute StrSQL, , adCmdText
       StrSQL = "INSERT into " & StrMsg & "('Lb002','102','医药费报销','s','B')"
              cnnTce.Execute StrSQL, , adCmdText
       StrSQL = "INSERT into " & StrMsg & "('Lb003','103','其它','s','C')"
              cnnTce.Execute StrSQL, , adCmdText
       StrSQL = "INSERT into " & StrMsg & "('Lb004','104','副食','z','A')"
              cnnTce.Execute StrSQL, , adCmdText
       StrSQL = "INSERT into " & StrMsg & "('Lb005','105','水费','z','B')"
              cnnTce.Execute StrSQL, , adCmdText
       StrSQL = "INSERT into " & StrMsg & "('Lb006','106','电话费','z','C')"
              cnnTce.Execute StrSQL, , adCmdText
       StrSQL = "INSERT into " & StrMsg & "('Lb007','107','煤气费','z','D')"
              cnnTce.Execute StrSQL, , adCmdText
       StrSQL = "INSERT into " & StrMsg & "('Lb008','108','医药费','z','E')"
              cnnTce.Execute StrSQL, , adCmdText
       StrSQL = "INSERT into " & StrMsg & "('Lb009','109','其它','z','F')"
              cnnTce.Execute StrSQL, , adCmdText
    End If
       
    Set MyRs2 = New Recordset
    StrSQL = "Select * From T_tm Where Dm = 'Mc001'"
    MyRs2.Open StrSQL, cnnTce, adOpenKeyset, adLockOptimistic
        StrShm = Trim(MyRs2![Mc])                                ' 取出名称
    Set MyRs2 = New Recordset
    StrSQL = "Select * From T_tm Where Dm = 'Mc002'"
    MyRs2.Open StrSQL, cnnTce, adOpenKeyset, adLockOptimistic
        StrGum = Trim(MyRs2![Mc])                                ' 取出冠名
    Set MyRs2 = New Recordset
    StrSQL = "Select * From T_tm Where Dm = 'Mc003'"
    MyRs2.Open StrSQL, cnnTce, adOpenKeyset, adLockOptimistic
        StrDwm = Trim(MyRs2![Mc])                                ' 取出单位
    MyRs2.Close
        
    StrCrq = Format(Date, "yyyy.mm.dd")

        i = imgLogo.Left + imgLogo.Width
        Label1.Caption = Trim(StrShm & " 程序")                           ' StrGum & " " &
        Label1.Left = i + (Frame1.Width - i - Label1.Width) / 2
        Label2.Caption = StrDwm
        Label2.Left = i + (Frame1.Width - i - Label2.Width) / 2

End Sub

⌨️ 快捷键说明

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