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

📄 form_diary.frm

📁 vb做的
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form Form_diary 
   Caption         =   "记事本"
   ClientHeight    =   6600
   ClientLeft      =   3210
   ClientTop       =   2565
   ClientWidth     =   9075
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   6600
   ScaleWidth      =   9075
   Begin VB.Frame Frame3 
      Height          =   2535
      Left            =   7680
      TabIndex        =   5
      Top             =   2880
      Width           =   1335
      Begin VB.CommandButton Command8 
         Caption         =   "查询"
         Height          =   375
         Left            =   120
         TabIndex        =   13
         Top             =   1080
         Width           =   1095
      End
      Begin VB.TextBox Text3 
         Height          =   375
         Left            =   120
         TabIndex        =   12
         Top             =   600
         Width           =   1095
      End
      Begin VB.CommandButton Command7 
         Caption         =   "下一个"
         Height          =   375
         Left            =   120
         TabIndex        =   7
         Top             =   2040
         Width           =   1095
      End
      Begin VB.CommandButton Command6 
         Caption         =   "上一个"
         Height          =   375
         Left            =   120
         TabIndex        =   6
         Top             =   1560
         Width           =   1095
      End
      Begin VB.Label Label1 
         Caption         =   "查询日期:"
         Height          =   255
         Left            =   120
         TabIndex        =   11
         Top             =   240
         Width           =   975
      End
   End
   Begin VB.Frame Frame2 
      Height          =   2655
      Left            =   7800
      TabIndex        =   3
      Top             =   0
      Width           =   1095
      Begin VB.CommandButton Command5 
         Caption         =   "删除"
         Height          =   375
         Left            =   120
         TabIndex        =   10
         Top             =   1440
         Width           =   855
      End
      Begin VB.CommandButton Command3 
         Caption         =   "新增"
         Height          =   375
         Left            =   120
         TabIndex        =   9
         Top             =   240
         Width           =   855
      End
      Begin VB.CommandButton Command4 
         Caption         =   "保存"
         Height          =   375
         Left            =   120
         TabIndex        =   8
         Top             =   840
         Width           =   855
      End
      Begin VB.CommandButton Command2 
         Caption         =   "背景颜色"
         Height          =   375
         Left            =   120
         TabIndex        =   4
         Top             =   2040
         Width           =   855
      End
   End
   Begin VB.Frame Frame1 
      Height          =   6495
      Left            =   120
      TabIndex        =   0
      Top             =   0
      Width           =   7335
      Begin MSDataGridLib.DataGrid DataGrid1 
         Bindings        =   "Form_diary.frx":0000
         Height          =   5655
         Left            =   5280
         TabIndex        =   14
         Top             =   720
         Width           =   1935
         _ExtentX        =   3413
         _ExtentY        =   9975
         _Version        =   393216
         AllowUpdate     =   -1  'True
         AllowArrows     =   -1  'True
         BackColor       =   -2147483626
         HeadLines       =   1
         RowHeight       =   17
         WrapCellPointer =   -1  'True
         FormatLocked    =   -1  'True
         AllowAddNew     =   -1  'True
         AllowDelete     =   -1  'True
         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 
               ColumnWidth     =   1500.095
            EndProperty
            BeginProperty Column01 
               Object.Visible         =   0   'False
               ColumnWidth     =   2085.166
            EndProperty
         EndProperty
      End
      Begin VB.TextBox Text1 
         BackColor       =   &H80000018&
         DataField       =   "正文"
         DataSource      =   "Adodc1"
         Height          =   6135
         Left            =   120
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   2
         Top             =   240
         Width           =   4935
      End
      Begin VB.TextBox Text2 
         BackColor       =   &H80000018&
         DataField       =   "日期"
         DataSource      =   "Adodc1"
         Height          =   390
         Left            =   5280
         TabIndex        =   1
         Top             =   240
         Width           =   1935
      End
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   7560
      Top             =   6000
      Visible         =   0   'False
      Width           =   1455
      _ExtentX        =   2566
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   $"Form_diary.frx":0015
      OLEDBString     =   $"Form_diary.frx":00B0
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from 记事本"
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSComDlg.CommonDialog CommonDialog1 
      Left            =   7680
      Top             =   5520
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
End
Attribute VB_Name = "Form_diary"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False



Private Sub Command2_Click()
CommonDialog1.Action = 3             '背景颜色
Text1.BackColor = CommonDialog1.Color
End Sub

Private Sub Command3_Click()
Adodc1.Recordset.AddNew  '新增
Text2.Text = Date
End Sub

Private Sub Command4_Click()
Adodc1.Recordset.Update
End Sub

Private Sub Command5_Click()
Adodc1.Recordset.Delete      '删除
End Sub

Private Sub Command6_Click()
If Adodc1.Recordset.BOF Then
   Adodc1.Recordset.MoveFirst
 MsgBox "已是第一条记录了哟~~"
Else
 Adodc1.Recordset.MovePrevious
End If
End Sub

Private Sub Command7_Click()
If Adodc1.Recordset.EOF Then
   Adodc1.Recordset.MoveLast
 MsgBox "已是最后一条记录了哟~~"
Else
 Adodc1.Recordset.MoveNext
End If
End Sub

Private Sub Command8_Click()
Dim capitulation As String
capitulation = Text3.Text
Adodc1.Recordset.MoveFirst
Adodc1.Recordset.Find "日期 = '" & capitulation & "'"
If Adodc1.Recordset.EOF Then
MsgBox "找不到哦~~今天没事做,呵呵~~"
End If
End Sub


⌨️ 快捷键说明

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