frmmessage.frm
来自「一款非常适合中小学教学任务不是很繁重的管理程序」· FRM 代码 · 共 316 行
FRM
316 行
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomct2.ocx"
Object = "{E95A2510-F3D1-416D-823B-4F840FE98091}#3.0#0"; "Command.ocx"
Object = "{3A6644DE-3402-11D9-9DE7-C33FAA87690A}#1.0#0"; "WinXPCEngine.ocx"
Begin VB.Form frmMessage
ClientHeight = 8160
ClientLeft = 60
ClientTop = 60
ClientWidth = 9450
ControlBox = 0 'False
LinkTopic = "Form1"
MDIChild = -1 'True
Picture = "frmMessage.frx":0000
ScaleHeight = 8160
ScaleWidth = 9450
WindowState = 2 'Maximized
Begin WinXPC_Engine.WindowsXPC WindowsXPC1
Left = 2835
Top = 3780
_ExtentX = 6588
_ExtentY = 1085
ColorScheme = 2
Common_Dialog = 0 'False
End
Begin MSComCtl2.DTPicker DTPicker1
Height = 375
Left = 3120
TabIndex = 9
Top = 1080
Width = 4575
_ExtentX = 8070
_ExtentY = 661
_Version = 393216
Format = 24838145
CurrentDate = 38867
End
Begin VB.TextBox txtIn
Height = 2175
Left = 3120
MultiLine = -1 'True
ScrollBars = 3 'Both
TabIndex = 1
Top = 1560
Width = 4575
End
Begin VB.TextBox txtOut
Height = 2175
Left = 3120
MultiLine = -1 'True
ScrollBars = 3 'Both
TabIndex = 0
Top = 4320
Width = 4575
End
Begin CSCommand.Command cmdFind
Height = 375
Left = 1440
TabIndex = 5
Top = 6840
Width = 975
_ExtentX = 1720
_ExtentY = 661
IconAlign = 0
Icon = "frmMessage.frx":151DA4
Caption = "显示"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin CSCommand.Command cmdExit
Height = 375
Left = 8040
TabIndex = 6
Top = 6840
Width = 975
_ExtentX = 1720
_ExtentY = 661
IconAlign = 0
Icon = "frmMessage.frx":151DC0
Caption = "关闭"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin CSCommand.Command cmdModiy
Height = 375
Left = 5400
TabIndex = 7
Top = 6840
Width = 975
_ExtentX = 1720
_ExtentY = 661
IconAlign = 0
Icon = "frmMessage.frx":151DDC
Caption = "修改"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin CSCommand.Command cmdPrint
Height = 375
Left = 6720
TabIndex = 8
Top = 6840
Width = 975
_ExtentX = 1720
_ExtentY = 661
IconAlign = 0
Icon = "frmMessage.frx":151DF8
Caption = "打印"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin CSCommand.Command cmdDel
Height = 375
Left = 4080
TabIndex = 11
Top = 6840
Width = 975
_ExtentX = 1720
_ExtentY = 661
IconAlign = 0
Icon = "frmMessage.frx":151E14
Caption = "删除"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin CSCommand.Command cmdAdd
Height = 375
Left = 2760
TabIndex = 12
Top = 6840
Width = 975
_ExtentX = 1720
_ExtentY = 661
IconAlign = 0
Icon = "frmMessage.frx":151E30
Caption = "添加"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.Label Label4
Alignment = 2 'Center
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "日期(主键):"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000040&
Height = 240
Index = 0
Left = 1620
TabIndex = 10
Top = 1200
Width = 1155
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "公告消息"
BeginProperty Font
Name = "MS Sans Serif"
Size = 18
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 435
Left = 4200
TabIndex = 4
Top = 240
Width = 1500
End
Begin VB.Label Label3
Alignment = 2 'Center
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "班内消息(200字):"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000040&
Height = 240
Left = 1485
TabIndex = 3
Top = 2160
Width = 1695
End
Begin VB.Label Label4
Alignment = 2 'Center
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "校内消息(200字):"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000040&
Height = 240
Index = 1
Left = 1425
TabIndex = 2
Top = 5160
Width = 1695
End
End
Attribute VB_Name = "frmMessage"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim strSql As String
Dim RS As ADODB.Recordset
Private Sub cmdAdd_Click()
'添加
On Error Resume Next
strSql = "insert into 公告信息表 values('" & str(Me.DTPicker1.Value) & "','" & txtIn.Text & "','" & txtOut.Text & "')"
dbOperate strSql
End Sub
Private Sub cmdDel_Click()
'删除
On Error Resume Next
strSql = "delete * from 公告信息表 where 日期='" & str(Me.DTPicker1.Value) & "'"
dbOperate strSql
End Sub
Private Sub cmdExit_Click()
Unload Me
End Sub
Private Sub cmdFind_Click()
'查找
On Error Resume Next
Me.txtIn.Text = ""
Me.txtOut.Text = ""
strSql = "select 班内信息,校内信息 from 公告信息表 where 日期='" & str(Me.DTPicker1.Value) & "'"
Set RS = dbSelect(strSql)
While Not RS.EOF
Me.txtIn.Text = RS.Fields(0)
Me.txtOut.Text = RS.Fields(1)
RS.MoveNext
Wend
Set RS = Nothing
End Sub
Private Sub cmdModiy_Click()
'修改
Call cmdDel_Click
Call cmdAdd_Click
End Sub
Private Sub cmdPrint_Click()
'打印
MsgBox "暂未编码", vbOKCancel + vbExclamation, "抱歉!"
End Sub
Private Sub Form_Load()
Me.DTPicker1.Value = Date
Call cmdFind_Click
Me.WindowsXPC1.InitSubClassing
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?