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

📄 personalinfo.frm

📁 Address Book implemented in VB 6,can be use for storing person information
💻 FRM
📖 第 1 页 / 共 4 页
字号:
      BackStyle       =   7
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Arial"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      cFore           =   65280
      cFHover         =   65535
      cBhover         =   255
      LockHover       =   3
      cGradient       =   0
      Gradient        =   3
      Mode            =   0
      Value           =   0   'False
      ImgAlign        =   4
      Image           =   "PersonalInfo.frx":04A6
      ImgSize         =   32
      cBack           =   16711680
   End
   Begin Project1.lvButtons_H lvbutton4Delete 
      Height          =   975
      Left            =   3360
      TabIndex        =   3
      Top             =   5280
      Width           =   975
      _ExtentX        =   1720
      _ExtentY        =   1720
      Caption         =   "&Delete"
      CapAlign        =   2
      BackStyle       =   7
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Arial"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      cFore           =   65280
      cFHover         =   65535
      cBhover         =   255
      LockHover       =   3
      cGradient       =   0
      Gradient        =   3
      Mode            =   0
      Value           =   0   'False
      ImgAlign        =   4
      Image           =   "PersonalInfo.frx":0D80
      ImgSize         =   32
      cBack           =   16711680
   End
   Begin Project1.lvButtons_H lvbutton3Find 
      Height          =   975
      Left            =   2280
      TabIndex        =   2
      Top             =   5280
      Width           =   975
      _ExtentX        =   1720
      _ExtentY        =   1720
      Caption         =   "&Find"
      CapAlign        =   2
      BackStyle       =   7
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Arial"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      cFore           =   65280
      cFHover         =   65535
      cBhover         =   255
      LockHover       =   3
      cGradient       =   0
      Gradient        =   3
      Mode            =   0
      Value           =   0   'False
      ImgAlign        =   4
      Image           =   "PersonalInfo.frx":1A5A
      ImgSize         =   32
      cBack           =   16711680
   End
   Begin Project1.lvButtons_H lvbutton2Edit 
      Height          =   975
      Left            =   1200
      TabIndex        =   1
      Top             =   5280
      Width           =   975
      _ExtentX        =   1720
      _ExtentY        =   1720
      Caption         =   "&Edit"
      CapAlign        =   2
      BackStyle       =   7
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Arial"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      cFore           =   65280
      cFHover         =   65535
      cBhover         =   255
      LockHover       =   3
      cGradient       =   0
      Gradient        =   3
      Mode            =   0
      Value           =   0   'False
      ImgAlign        =   4
      Image           =   "PersonalInfo.frx":2334
      ImgSize         =   32
      cBack           =   16711680
   End
   Begin Project1.lvButtons_H lvbutton1AddNew 
      Height          =   975
      Left            =   120
      TabIndex        =   0
      Top             =   5280
      Width           =   975
      _ExtentX        =   1720
      _ExtentY        =   1720
      Caption         =   "Add &New"
      CapAlign        =   2
      BackStyle       =   7
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Arial"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      cFore           =   65280
      cFHover         =   65535
      cBhover         =   255
      LockHover       =   3
      cGradient       =   0
      Gradient        =   3
      Mode            =   0
      Value           =   0   'False
      ImgAlign        =   4
      Image           =   "PersonalInfo.frx":300E
      ImgSize         =   32
      cBack           =   16711680
   End
   Begin VB.CommandButton Command1 
      BackColor       =   &H00808080&
      Enabled         =   0   'False
      Height          =   1215
      Left            =   0
      Style           =   1  'Graphical
      TabIndex        =   58
      Top             =   5160
      Width           =   8895
   End
   Begin VB.Menu mnuPrint 
      Caption         =   "Print"
      Visible         =   0   'False
      Begin VB.Menu mnuFileTextSidebar 
         Caption         =   $"PersonalInfo.frx":38E8
      End
      Begin VB.Menu mnuPrintCurrentList 
         Caption         =   "&Current List"
      End
      Begin VB.Menu mnuPrintAll 
         Caption         =   "&All"
      End
      Begin VB.Menu mnuPrintGender 
         Caption         =   "By &Gender"
         Begin VB.Menu mnuPrintMale 
            Caption         =   "&Male"
         End
         Begin VB.Menu mnuPrintFemale 
            Caption         =   "&Female"
         End
      End
   End
End
Attribute VB_Name = "frmPersonalInfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Form_Load()
       
     If mode = True Then
     Call main
     End If
     infomode = True
     findmode = False
     modMenus.HighlightDisabledMenuItems = True
     modMenus.HighlightGradient = True
     modMenus.RaisedIconOnSelect = True
     modMenus.SelectedItemBackColor = vbBlue
     modMenus.SelectedItemTextColor = vbCyan
     modMenus.SeparatorBarColor_Dark = vbBlue
     modMenus.SeparatorBarColor_Light = vbBlue
     SetMenu frmPersonalInfo.hWnd
     Call loaddataforviewing
     mode = False
         
End Sub

Private Sub lvbutton1AddNew_Click()
  
     frmPersonalInfo.Hide
     Load frmAddNew
     frmAddNew.Caption = "Add New"
     frmAddNew.Show
     Call cmdCover(False, True, True, False, False)
     Call lockcontrols(True)
 
End Sub

Private Sub lvbutton2Edit_Click()
   
     If adoview.BOF = True Or adoview.EOF = True Then
        MsgBox "Empty Database!", vbInformation, "Address Book"
        Exit Sub
     Else
        Call cmdCover(True, True, True, True, False)
        Call lvbutton(False)
        Call lockcontrols(False)
        Call loaddatatoedit
        Call editbutton(True)
        frmAddNew.imgpic.Picture = frmPersonalInfo.imgpic.Picture
        Load frmAddNew
        frmAddNew.Show
        frmAddNew.Caption = "Edit"
        Unload Me
     End If
 
End Sub

Private Sub lvbutton3Find_Click()
   
     Load frmFind
     frmFind.Show
     Unload Me

End Sub

Private Sub lvbutton4Delete_Click()
     
     Dim res As VbMsgBoxResult
     With adoview
        If .BOF And .EOF = True Then
           MsgBox "Empty Database!", vbInformation, "Address Book"
           Exit Sub
        Else
           res = MsgBox("Are you sure you want to Delete  " & adoview!firstname & " ''" & adoview!nickname & "'' " & adoview!lastname, vbYesNo, "Confirmation")
              If res = vbYes Then
                 .Delete
                 .Requery
                 Call clearlblcontrols
              Else
                 Exit Sub
              End If
           Call loaddataforviewing
        End If
     End With
    
End Sub

Private Sub lvbutton5Print_Click()

     Call PopupMenu(mnuPrint)

End Sub

Private Sub lvbutton6Close_Click()

     infomode = False
     findmode = False
     mode = True
     With frmMain
       .Enabled = True
       .SetFocus
       On Error Resume Next
       Kill App.Path & "\tmpfile.swf"
       LoadDataIntoFile 101, App.Path & "\tmpfile.swf"
       .WebBrowser1.Navigate App.Path & "\tmpfile.swf"
     End With
     Unload Me
     cnn.Close
     Set adoview = Nothing
     
End Sub

Private Sub lvbutton7MoveFirst_Click()
        
     If adoview.recordcount <= 1 Then Exit Sub
     adoview.MoveFirst
     Call loaddataforviewing
        
End Sub

Private Sub lvbutton8Previous_Click()
        
     If adoview.AbsolutePosition <= 1 Then Exit Sub
     adoview.MovePrevious
     Call loaddataforviewing
       
End Sub

Private Sub lvbutton9Next_Click()
        
     If adoview.AbsolutePosition >= adoview.recordcount Or adoview.recordcount <= 1 Then Exit Sub
     adoview.MoveNext
     Call loaddataforviewing
      
End Sub

Private Sub lvbutton10MoveLast_Click()
        
     If adoview.recordcount <= 1 Then Exit Sub
     adoview.MoveLast
     Call loaddataforviewing
  
End Sub

Private Sub mnuPrintAll_Click()
    
    On Error Resume Next
    If adoview.BOF = True And adoview.EOF = True Then
    MsgBox "Empty Database", vbInformation, "Address Book"
    Exit Sub
    Else
    Set jessiepanerioALL.DataSource = adoview
    jessiepanerioALL.Show
    End If

End Sub

Private Sub mnuPrintCurrentList_Click()
    
    On Error Resume Next
    If adoview.BOF = True And adoview.EOF = True Then
    MsgBox "Empty Database", vbInformation, "Address Book"
    Exit Sub
    Else
    adoview.Close
    Dim SQLTEXT As String
    SQLTEXT = "SELECT * FROM addressbook WHERE Left(lastname," & Len(lblLastName.Caption) & ")='" & lblLastName.Caption & "' And Left(nickname," & Len(lblNickName1.Caption) & ")='" & lblNickName1.Caption & "'"
    Set adoview = New ADODB.Recordset
    adoview.Open SQLTEXT, cnn, adOpenStatic, adLockPessimistic
    Set jessiepanerioCL.DataSource = adoview
    jessiepanerioCL.Show
    Call rs_view
    End If

End Sub
     
Private Sub mnuPrintMale_Click()
    
    On Error Resume Next
    If adoview.BOF = True And adoview.EOF = True Then
    MsgBox "Empty Database", vbInformation, "Address Book"
    Exit Sub
    Else
    Set adoview = New ADODB.Recordset
    adoview.Open "Select * from addressbook WHERE gender = 'MALE';", cnn, adOpenStatic, adLockPessimistic
    Set jessiepanerioByGender.DataSource = adoview
    jessiepanerioByGender.Show
    End If
        
End Sub

Private Sub mnuPrintFemale_Click()

    On Error Resume Next
    If adoview.BOF = True And adoview.EOF = True Then
    MsgBox "Empty Database", vbInformation, "Address Book"
    Exit Sub
    Else
    Set adoview = New ADODB.Recordset
    adoview.Open "Select * from addressbook WHERE gender = 'FEMALE';", cnn, adOpenStatic, adLockPessimistic
    Set jessiepanerioByGender.DataSource = adoview
    jessiepanerioByGender.Show
    End If

End Sub

⌨️ 快捷键说明

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