VERSION 5.00
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form frmBrow 
   Caption         =   "影片库浏览"
   ClientHeight    =   3630
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   7890
   LinkTopic       =   "Form1"
   ScaleHeight     =   3630
   ScaleWidth      =   7890
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton cmdDel 
      Caption         =   "删除"
      Height          =   375
      Left            =   4200
      TabIndex        =   4
      Top             =   3180
      Width           =   735
   End
   Begin VB.CommandButton cmdModify 
      Caption         =   "修改"
      Height          =   375
      Left            =   3000
      TabIndex        =   3
      Top             =   3180
      Width           =   855
   End
   Begin VB.CommandButton cmdPlay 
      Caption         =   "播放"
      Height          =   375
      Left            =   1680
      TabIndex        =   2
      Top             =   3195
      Width           =   855
   End
   Begin MSDataGridLib.DataGrid dbdFilm 
      Height          =   2835
      Left            =   120
      TabIndex        =   1
      Top             =   240
      Width           =   7695
      _ExtentX        =   13573
      _ExtentY        =   5001
      _Version        =   393216
      HeadLines       =   1
      RowHeight       =   15
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ColumnCount     =   2
      BeginProperty Column00 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column01 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
         EndProperty
         BeginProperty Column01 
         EndProperty
      EndProperty
   End
   Begin VB.CommandButton cmdClose 
      Caption         =   "关闭"
      Height          =   375
      Left            =   5400
      TabIndex        =   0
      Top             =   3195
      Width           =   975
   End
End
Attribute VB_Name = "frmBrow"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim ModiFlag As Boolean       '使用模块级变量记载数据网格是否为修改状态
Private Sub Form_Load()
    Set dbdFilm.DataSource = rsFilm     '设置数据网格的记录源
        dbdFilm.AllowUpdate = False     '设置数据网格控件为不可修改状态
        cmdModify.Caption = "修改"
        ModiFlag = False
End Sub

Private Sub Form_Unload(Cancel As Integer)
    frmMain.Show            '显示frmMain窗体
End Sub
Private Sub cmdClose_Click()
    Unload Me   '卸载窗体
End Sub

Private Sub cmdDel_Click()
    Dim flag As Integer     '设置临时的标志变量，用于记录对话框返回值
    flag = MsgBox(rsFilm.Fields("片名") + " 将从数据库中删除,确定要这样做吗?", _
                    vbYesNo, "删除影片")
    If flag = vbYes Then    '判断在对话框中是否选择"是"按钮
        rsFilm.Delete       '删除当前记录
        rsFilm.Resync       '刷新记录
    End If
    
End Sub



Private Sub cmdPlay_Click()
    frmMain.cmdPlay_Click   '调用frmMain窗体的cmdPlay_Click事件播放影片
    Unload Me               '卸载窗体
End Sub

Private Sub cmdModify_Click()
    If ModiFlag = False Then      '检查修改状态标志
        dbdFilm.AllowUpdate = True      '设置数据网格控件为可修改状态
        cmdModify.Caption = "浏览"
        ModiFlag = True
    Else
        dbdFilm.AllowUpdate = False     '设置数据网格控件为不可修改状态
        cmdModify.Caption = "修改"
        ModiFlag = False
    End If
    
        
End Sub





