📄 framemain.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.Form FrameMain
BorderStyle = 0 'None
Caption = "慧海图书财务接口程序"
ClientHeight = 3195
ClientLeft = 45
ClientTop = 615
ClientWidth = 4680
Icon = "FrameMain.frx":0000
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 3195
ScaleWidth = 4680
ShowInTaskbar = 0 'False
Begin VB.Timer Timer1
Left = 3120
Top = 9240
End
Begin MSComctlLib.StatusBar StatusBar1
Align = 2 'Align Bottom
Height = 375
Left = 0
TabIndex = 0
Top = 2820
Width = 4680
_ExtentX = 8255
_ExtentY = 661
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 5
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Object.Width = 5998
MinWidth = 5998
Picture = "FrameMain.frx":08CA
Text = "慧海图书凭证接口系统 "
TextSave = "慧海图书凭证接口系统 "
EndProperty
BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Alignment = 1
Object.Width = 5362
MinWidth = 5362
EndProperty
BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Alignment = 1
Object.Width = 6244
MinWidth = 6244
EndProperty
BeginProperty Panel4 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Alignment = 1
Object.Width = 5292
MinWidth = 5292
EndProperty
BeginProperty Panel5 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Alignment = 2
AutoSize = 1
EndProperty
EndProperty
End
Begin MSComctlLib.ImageList ImageList1
Left = 840
Top = 6720
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 16
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrameMain.frx":0D1C
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrameMain.frx":1036
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrameMain.frx":1488
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrameMain.frx":18DA
Key = ""
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrameMain.frx":1BF4
Key = ""
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrameMain.frx":1D4E
Key = ""
EndProperty
BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrameMain.frx":21A0
Key = ""
EndProperty
BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrameMain.frx":25F2
Key = ""
EndProperty
BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrameMain.frx":2A44
Key = ""
EndProperty
BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrameMain.frx":2E96
Key = ""
EndProperty
BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrameMain.frx":32E8
Key = ""
EndProperty
BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrameMain.frx":373A
Key = ""
EndProperty
BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrameMain.frx":3B94
Key = ""
EndProperty
BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrameMain.frx":3FE6
Key = ""
EndProperty
BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrameMain.frx":4438
Key = ""
EndProperty
BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrameMain.frx":4592
Key = ""
EndProperty
EndProperty
End
Begin MSComctlLib.TreeView trv
Height = 3135
Left = 0
TabIndex = 1
Top = 120
Width = 1815
_ExtentX = 3201
_ExtentY = 5530
_Version = 393217
Indentation = 636
LineStyle = 1
Style = 7
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.Image Image1
Height = 9000
Left = 2280
Picture = "FrameMain.frx":49E4
Top = 960
Width = 11985
End
Begin VB.Menu mnuhelp
Caption = "帮助 "
End
Begin VB.Menu mnuabout
Caption = "关于 "
End
Begin VB.Menu mnuexit
Caption = "退出"
End
End
Attribute VB_Name = "FrameMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
Private Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpString As Any, ByVal lpFileName As String) As Long
Private Sub Form_Load()
With trv
.Left = 10
.Top = 1100
.Width = 2895
.Height = FrameMain.Height - 960 - 400 - 500
End With
With Image1
.Stretch = True
.Top = 0
.Left = 0
.Height = FrameMain.Height
.Width = FrameMain.Width
End With
Dim s As String
's = Now
Timer1.Interval = 1000 '以秒为单位
'Label2.Caption = Nowuser
StatusBar1.Panels(2).Text = "制单人:" + GetIniS("system", "zhidanren", "")
StatusBar1.Panels(3).Text = "系统日期:" + CStr(DateSerial(Year(Now), Month(Now), Day(Now)))
StatusBar1.Panels(4).Text = WeekDay(DatePart("w", DateSerial(Year(Now), Month(Now), Day(Now)), vbMonday))
trv.Nodes.Clear
Dim Node As Node
Set Node = trv.Nodes.Add(, , , "导入凭证分类")
Set Node = trv.Nodes.Add(1, tvwChild, , "商品采购自购凭证导入")
Set Node = trv.Nodes.Add(1, tvwChild, , "销售凭证导入")
Set Node = trv.Nodes.Add(1, tvwChild, , "委托代销入库凭证导入")
Set Node = trv.Nodes.Add(1, tvwChild, , "委托代销退货凭证导入")
'Set Node = trv.Nodes.Add(1, tvwChild, , "其他入库导入", 4, 4)
'Set Node = trv.Nodes.Add(, , , "基础资料管理", 1, 1)
'Set Node = trv.Nodes.Add(6, tvwChild, , "科目设置", 8, 8)
'Set Node = trv.Nodes.Add(6, tvwChild, , "制单人", 15, 15)
Set Node = trv.Nodes.Add(, , , "退出系统")
Node.Expanded = False
End Sub
Private Sub Form_Resize()
If FrameMain.Height > 1880 And FrameMain.Width > 1700 Then
With trv
.Left = 10
.Top = 1100
.Width = 2895
.Height = FrameMain.Height - 960 - 400 - 500
End With
End If
With Image1
.Stretch = True
.Top = 0
.Left = 0
.Height = FrameMain.Height
.Width = FrameMain.Width
End With
End Sub
Private Sub mnuabout_Click()
frmSplash.Show
End Sub
Private Sub mnuexit_Click()
On Error Resume Next
If (MsgBox("确定退出系统吗?", vbOKCancel + vbDefaultButton2 + vbExclamation) = vbOK) Then
Unload Me
Unload MDIForm1
End If
End Sub
Private Sub trv_NodeClick(ByVal Node As MSComctlLib.Node)
Select Case Node.Index
Case 2 '
With trans
End With
trans.Show
Case 3
transxiaoshou.Show
Case 4
transdaixiao.Show
Case 5
transchuzu.Show
Case 7
kemu.Show
Case 8
zhidanren.Show
Case 6
If (MsgBox("确定退出系统吗?", vbOKCancel + vbDefaultButton2 + vbExclamation) = vbOK) Then
Unload Me
Unload MDIForm1
End If
End Select
End Sub
Private Function WeekDay(ByVal x As Integer) As String
If x >= 1 And x <= 7 Then
Select Case x
Case 1
WeekDay = "星期一"
Case 2
WeekDay = "星期二"
Case 3
WeekDay = "星期三"
Case 4
WeekDay = "星期四"
Case 5
WeekDay = "星期五"
Case 6
WeekDay = "星期六"
Case 7
WeekDay = "星期日"
End Select
Else
MsgBox "输入有误,数字应该在1-7之间"
Exit Function
End If
End Function
Private Sub Timer1_Timer()
StatusBar1.Panels(5).Text = Time
End Sub
Private Function GetIniS(ByVal SectionName As String, ByVal KeyWord As String, ByVal DefString As String) As String
Dim ResultString As String * 144, Temp As Integer
Dim s As String, i As Integer
Temp% = GetPrivateProfileString(SectionName, KeyWord, "", ResultString, 144, App.Path & "\hh.ini")
'检索关键词的值
If Temp% > 0 Then '关键词的值不为空
s = ""
For i = 1 To 144
If Asc(Mid$(ResultString, i, 1)) = 0 Then
Exit For
Else
s = s & Mid$(ResultString, i, 1)
End If
Next
Else
Temp% = WritePrivateProfileString(SectionName, KeyWord, DefString, App.Path & "\hh.ini")
'将缺省值写入INI文件
s = DefString
End If
GetIniS = s
End Function
Private Sub SetIniS(ByVal SectionName As String, ByVal KeyWord As String, ByVal ValStr As String)
Dim res%
res% = WritePrivateProfileString(SectionName, KeyWord, ValStr, App.Path & "\hh.ini")
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -