📄 main_fzgj_jsb.frm
字号:
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column03
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
MarqueeStyle = 4
BeginProperty Column00
ColumnWidth = 540.284
EndProperty
BeginProperty Column01
ColumnWidth = 1019.906
EndProperty
BeginProperty Column02
ColumnWidth = 2534.74
EndProperty
BeginProperty Column03
ColumnWidth = 6284.977
EndProperty
EndProperty
End
Begin VB.Frame Frame1
Height = 3765
Left = -74865
TabIndex = 7
Top = 405
Width = 9795
Begin MSAdodcLib.Adodc Adodc1
Height = 390
Left = -60
Top = 2400
Visible = 0 'False
Width = 1860
_ExtentX = 3281
_ExtentY = 688
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = $"main_fzgj_jsb.frx":050C
OLEDBString = $"main_fzgj_jsb.frx":05A3
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from tb_notepad"
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 VB.TextBox txtDate
BackColor = &H80000018&
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Left = 5040
TabIndex = 17
Top = 270
Width = 1455
End
Begin VB.CommandButton cmdEnd
Caption = "退出(&Q)"
Height = 315
Left = 8640
TabIndex = 13
Top = 270
Width = 1005
End
Begin VB.TextBox txtTitle
BackColor = &H80000018&
Height = 300
Left = 1035
TabIndex = 11
Top = 270
Width = 3240
End
Begin VB.CommandButton cmdSave
Caption = "保存(&S)"
Height = 315
Left = 7650
TabIndex = 10
Top = 270
Width = 1005
End
Begin VB.CommandButton cmdAdd
Caption = "记事(&J)"
Height = 315
Left = 6660
TabIndex = 9
Top = 270
Width = 1005
End
Begin VB.TextBox txtMemo
BackColor = &H80000018&
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2970
Left = 1050
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 8
Top = 660
Width = 8595
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "日期:"
Height = 180
Left = 4425
TabIndex = 16
Top = 315
Width = 540
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "记事内容:"
Height = 180
Left = 120
TabIndex = 14
Top = 645
Width = 900
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "记事标题:"
Height = 180
Left = 120
TabIndex = 12
Top = 315
Width = 900
End
End
End
End
Attribute VB_Name = "main_fzgj_jsb"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*************************************************************************
'**模 块 名:main_fzgj_jsb
'**版权说明:吉林省明日科技有限公司享有本软件的所有版权,如果本软件用于商
'** 业用途,必须经过吉林省明日科技有限公司授权。如果提供网上免费
'** 下载,必须经过吉林省明日科技有限公司授权,并保证程序的完整,
'** 不得修改代码、注释和相关内容,否则,我公司将追究其法律责任
'**网 址:www.mingrisoft.com 价值无限,服务无限
'**电 话:(0431)84978981,84978982
'**创 建 人:明日科技
'**日 期:2007-10-31
'**修 改 人:MRLBB
'**日 期:2007-10-31
'**描 述:
'*************************************************************************
Sub view_data()
txt_Date.text = DataGrid1.Columns(1).text
txt_Title.text = DataGrid1.Columns(2).text
txt_Memo.text = DataGrid1.Columns(3).text
End Sub
Private Sub cmdAdd_Click()
txtDate.text = Format(Date, "yyyy-mm-dd")
txtTitle.text = ""
txtMemo.text = ""
cmdSave.Enabled = True
cmdAdd.Enabled = False
txtDate.Enabled = True
txtTitle.Enabled = True
txtMemo.Enabled = True
txtTitle.SetFocus
End Sub
Private Sub cmdDel_Click()
If txt_Title.text = "" Then
MsgBox "请在查询选项卡中数据列表中选择你要删除的数据 !", vbOKOnly + vbQuestion, "提示"
SSTab1.Tab = 1
Exit Sub
End If
If MsgBox("是否清除当前数据? ", vbOKCancel + vbQuestion, "提示") = vbOK Then
If Adodc2.Recordset.RecordCount > 0 Then
Adodc2.Recordset.Delete
Adodc2.Recordset.Update
Adodc2.RecordSource = "tb_notepad"
Adodc2.Refresh
End If
End If
End Sub
Private Sub CmdEnd_Click()
Unload Me
End Sub
Private Sub cmdExit_Click()
Unload Me
End Sub
Private Sub cmdFind_Click()
If opTitle.Value Then
Adodc2.RecordSource = "tb_notepad where 标题 like '" + txtFindTitle.text + "%'"
Adodc2.Refresh
ElseIf opDate.Value Then
Adodc2.RecordSource = "tb_notepad where 日期 =" + Str(DTPicker1.Value) + ""
Adodc2.Refresh
End If
End Sub
Private Sub cmdSave_Click()
If txtTitle.text = "" Then
MsgBox "标题不能为空 !", vbOKOnly + vbQuestion, "提示"
txtTitle.SetFocus
Exit Sub
End If
Adodc1.Recordset.AddNew
Adodc1.Recordset.Fields(1).Value = txtDate.text
Adodc1.Recordset.Fields(2).Value = txtTitle.text
Adodc1.Recordset.Fields(3).Value = txtMemo.text
Adodc1.Recordset.Update
Adodc1.RecordSource = "select * from tb_notepad"
Adodc1.Refresh
MsgBox "记事成功! ", vbInformation, "提示"
cmdAdd.Enabled = True
cmdSave.Enabled = False
txtDate.text = ""
txtTitle.text = ""
txtMemo.text = ""
txtDate.Enabled = False
txtTitle.Enabled = False
txtMemo.Enabled = False
End Sub
Private Sub DataGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer)
On Error Resume Next
view_data
End Sub
Private Sub Form_Load()
Adodc1.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=db_JXC;Data Source=."
Adodc2.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=db_JXC;Data Source=."
Adodc1.RecordSource = "select * from tb_notepad"
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc2
txtDate.text = ""
txtTitle.text = ""
txtMemo.text = ""
txtDate.Enabled = False
txtTitle.Enabled = False
txtMemo.Enabled = False
cmdSave.Enabled = False
End Sub
Private Sub SSTab1_Click(PreviousTab As Integer)
If SSTab1.Tab = 0 Then
cmdSave.Enabled = False
cmdAdd.Enabled = True
txtDate.text = ""
txtTitle.text = ""
txtMemo.text = ""
txtDate.Enabled = False
txtTitle.Enabled = False
txtMemo.Enabled = False
ElseIf SSTab1.Tab = 1 Then
Adodc2.RecordSource = "tb_notepad"
Adodc2.Refresh
view_data
End If
End Sub
Private Sub cmd_End_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -