📄 frm_mainbefore.frm
字号:
End
Begin VB.Menu Line
Caption = "-"
End
Begin VB.Menu wap
Caption = "短消息服务(局域网)"
End
End
Begin VB.Menu System
Caption = "系统维护管理(&S)"
Begin VB.Menu sysPerson
Caption = "人事管理"
End
Begin VB.Menu sysVote
Caption = "投票管理"
End
Begin VB.Menu sysIdear
Caption = "意见箱管理"
End
Begin VB.Menu line2
Caption = "-"
End
Begin VB.Menu Sys
Caption = "系统设置"
End
End
Begin VB.Menu fz
Caption = "辅助工具(&F)"
Begin VB.Menu net
Caption = "登录Internet"
End
Begin VB.Menu Line4
Caption = "-"
End
Begin VB.Menu computer
Caption = "计算器"
End
Begin VB.Menu Book
Caption = "记事本"
End
Begin VB.Menu line3
Caption = "-"
End
Begin VB.Menu Word
Caption = "调用 Word"
End
Begin VB.Menu Excel
Caption = "调用 Excel"
End
End
Begin VB.Menu exit
Caption = "系统退出(&E)"
Begin VB.Menu Login
Caption = "重新登录(&L)"
Shortcut = ^L
End
Begin VB.Menu end
Caption = "退出系统(&E)"
Shortcut = ^{F4}
End
End
End
Attribute VB_Name = "frm_mainBefore"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'声明API函数
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Declare Function AnimateWindow Lib "user32" (ByVal hWnd As Long, ByVal mytime As Long, ByVal style As Long) As Boolean
Private Declare Function CreateRoundRectRgn Lib "gdi32" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long, ByVal X3 As Long, ByVal Y3 As Long) As Long
Private Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Long
Private Sub Book_Click()
Dim ReturnValue, i
ReturnValue = Shell("notepad.exe", 1) ' 运行计算器。'Shell调用可执行文件
AppActivate ReturnValue ' 激活计算器。
End Sub
Private Sub CFile_Click()
frmFile.Show
End Sub
Private Sub computer_Click()
Dim ReturnValue, i
ReturnValue = Shell("Calc.EXE", 1) ' 运行计算器。'Shell调用可执行文件
AppActivate ReturnValue ' 激活计算器。
End Sub
Private Sub end_Click()
End
End Sub
Private Sub Excel_Click()
'使用API函数调用 Excel
ShellExecute Me.hWnd, "open", "excel.exe", "", 1, 5
End Sub
Private Sub Form_Activate()
For i = 1 To TreeView1.Nodes.Count
'展开全部节点。
TreeView1.Nodes(i).Expanded = True
Next i
End Sub
Private Sub net_Click()
'使用API函数 登陆 指定的网址
ShellExecute Me.hWnd, "open", "http://www.mingrisoft.com", 1, 1, 5
End Sub
Private Sub Sys_Click()
frmSys_sys.Show
End Sub
Private Sub sysIdear_Click()
frmSys_idear.Show
End Sub
Private Sub sysPerson_Click()
frmSys_person.Show
End Sub
Private Sub sysVote_Click()
frmSys_vote.Show
End Sub
Private Sub TreeView1_NodeClick(ByVal Node As MSComctlLib.Node)
If TreeView1.SelectedItem.Key = "发布通知" Then frmNotice_issue.Show
If TreeView1.SelectedItem.Key = "接收通知" Then frmNotice_incept.Show
If TreeView1.SelectedItem.Key = "已发通知" Then frmNotice_toVoice.Show
If TreeView1.SelectedItem.Key = "新闻发布" Then frmNews_issue.Show
If TreeView1.SelectedItem.Key = "接收新闻" Then frmNews_incept.Show
If TreeView1.SelectedItem.Key = "已发新闻" Then frmNews_toNews.Show
If TreeView1.SelectedItem.Key = "新闻发布" Then frmNews_issue.Show
If TreeView1.SelectedItem.Key = "接收新闻" Then frmNews_incept.Show
If TreeView1.SelectedItem.Key = "已发新闻" Then frmNews_toNews.Show
If TreeView1.SelectedItem.Key = "传送文件" Then frmFile.Show
If TreeView1.SelectedItem.Key = "接收文件" Then frmFile_incept.Show
If TreeView1.SelectedItem.Key = "已发文件" Then frmFile_toFile.Show
If TreeView1.SelectedItem.Key = "意见箱" Then frmAC_idear.Show
If TreeView1.SelectedItem.Key = "投票活动" Then frmAC_vote.Show
If TreeView1.SelectedItem.Key = "短消息服务" Then frmAC_QQ.Show
If TreeView1.SelectedItem.Key = "人事管理" Then frmSys_person.Show
If TreeView1.SelectedItem.Key = "投票管理" Then frmSys_vote.Show
If TreeView1.SelectedItem.Key = "意见箱管理" Then frmSys_idear.Show
If TreeView1.SelectedItem.Key = "系统设置" Then frmSys_sys.Show
End Sub
Private Sub Form_Load()
'////设置 NEWS
adoNews.ConnectionString = PublicStr
adoNews.RecordSource = "SELECT news_date,news_text FROM tbOA_news WHERE (news_acceptPerson = '" & frm_login.Text1 & "') ORDER BY news_date DESC"
adoNews.Refresh
Set MSHFlexGrid2.DataSource = adoNews
Call setNewsDataGrid_Caption
'/////设置通知
adoNotice.ConnectionString = PublicStr
adoNotice.RecordSource = "SELECT notice_date,notice_person,notice_acceptDept,notice_acceptPerson,notice_text FROM tbOA_notice WHERE (notice_acceptPerson = '" & frm_login.Text1 & "') ORDER BY notice_date DESC"
adoNotice.Refresh
Set MSHFlexGrid1.DataSource = adoNotice
Call setNoticeDataGrid_Caption
End Sub
Private Sub inceptNews_Click()
frmNews_incept.Show
End Sub
Private Sub inceptVoice_Click()
frmNotice_incept.Show
End Sub
Private Sub issueNews_Click()
frmNews_issue.Show
End Sub
Private Sub JFile_Click()
frmFile_incept.Show
End Sub
Private Sub Login_Click()
frm_login.Show
Unload Me
End Sub
Private Sub mind_Click()
frmAC_idear.Show
End Sub
Private Sub poll_Click()
frmAC_vote.Show
End Sub
Private Sub putVoice_Click()
frmNotice_issue.Show
End Sub
Private Sub Timer1_Timer()
'////设置 NEWS
adoNews.RecordSource = "SELECT news_date,news_text FROM tbOA_news WHERE (news_acceptPerson = '" & Mid(StatusBar1.Panels(1).Text, 6, Len(StatusBar1.Panels(1).Text) - 5) & "') ORDER BY news_date DESC"
adoNews.Refresh
Call setNewsDataGrid_Caption
'//////设置通知
adoNotice.RecordSource = "SELECT notice_date,notice_person,notice_acceptDept,notice_acceptPerson,notice_text FROM tbOA_notice WHERE (notice_acceptPerson = '" & Mid(StatusBar1.Panels(1).Text, 6, Len(StatusBar1.Panels(1).Text) - 5) & "') ORDER BY notice_date DESC"
adoNotice.Refresh
Call setNoticeDataGrid_Caption
End Sub
Private Sub toFile_Click()
frmFile_toFile.Show
End Sub
Private Sub toNews_Click()
frmNews_toNews.Show
End Sub
Private Sub toVoice_Click()
frmNotice_toVoice.Show
End Sub
Sub setNewsDataGrid_Caption()
For i = 1 To adoNews.Recordset.RecordCount
MSHFlexGrid2.TextMatrix(i, 0) = i
Next
MSHFlexGrid2.TextMatrix(0, 0) = "序号"
MSHFlexGrid2.TextMatrix(0, 1) = "发布日期"
MSHFlexGrid2.TextMatrix(0, 2) = "新闻内容"
MSHFlexGrid2.ColWidth(0) = 400
MSHFlexGrid2.ColWidth(1) = 1000
MSHFlexGrid2.ColWidth(2) = 6700
End Sub
Sub setNoticeDataGrid_Caption()
For i = 1 To adoNotice.Recordset.RecordCount
MSHFlexGrid1.TextMatrix(i, 0) = i
Next
MSHFlexGrid1.TextMatrix(0, 0) = "序号"
MSHFlexGrid1.TextMatrix(0, 1) = "通知日期"
MSHFlexGrid1.TextMatrix(0, 2) = "发布通知人"
MSHFlexGrid1.TextMatrix(0, 3) = "通知部门"
MSHFlexGrid1.TextMatrix(0, 4) = "通知人"
MSHFlexGrid1.TextMatrix(0, 5) = "通知内容"
MSHFlexGrid1.ColWidth(0) = 400
MSHFlexGrid1.ColWidth(1) = 1000
MSHFlexGrid1.ColWidth(2) = 1000
MSHFlexGrid1.ColWidth(3) = 1300
MSHFlexGrid1.ColWidth(4) = 800
MSHFlexGrid1.ColWidth(5) = 3600
End Sub
Private Sub wap_Click()
frmAC_QQ.Show
End Sub
Private Sub Word_Click()
ShellExecute Me.hWnd, "open", "winword.exe", "", 1, 5
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -