📄 frmmain.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.Form frmMain
BackColor = &H8000000C&
Caption = "股票分析系统"
ClientHeight = 5940
ClientLeft = 1695
ClientTop = 1620
ClientWidth = 8595
LinkTopic = "Form1"
ScaleHeight = 5940
ScaleWidth = 8595
StartUpPosition = 2 '屏幕中心
WindowState = 2 'Maximized
Begin VB.Timer Timer1
Interval = 1000
Left = 2160
Top = 2040
End
Begin MSComctlLib.StatusBar sbrDB
Align = 2 'Align Bottom
Height = 492
Left = 0
TabIndex = 1
Top = 5448
Width = 8592
_ExtentX = 15161
_ExtentY = 873
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 1
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
EndProperty
EndProperty
End
Begin MSComctlLib.ImageList ImList
Left = 960
Top = 2520
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 22
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":0000
Key = "cx"
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":0544
Key = "user"
Object.Tag = "user"
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":0860
Key = "ls"
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":0CB4
Key = ""
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":0FD0
Key = "analysis"
Object.Tag = "analysis"
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":1424
Key = "stock"
Object.Tag = "stock"
EndProperty
BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":1878
Key = "jj"
EndProperty
BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":1B94
Key = "sr"
EndProperty
BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":1CA8
Key = "Del"
EndProperty
BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":1DBC
Key = "sr1"
EndProperty
BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":1ED0
Key = "Save"
EndProperty
BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":1FE4
Key = "exit"
EndProperty
BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":20F8
Key = "yf"
EndProperty
BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":254C
Key = "dy"
EndProperty
BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":29A0
Key = "xs"
EndProperty
BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":2DF4
Key = "xb"
EndProperty
BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":3248
Key = "hlp"
EndProperty
BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":369C
Key = "about"
Object.Tag = "about"
EndProperty
BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":3AF0
Key = ""
EndProperty
BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":3F44
Key = "js"
EndProperty
BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":4398
Key = "ys"
EndProperty
BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":46EC
Key = "Delline"
EndProperty
EndProperty
End
Begin MSComctlLib.Toolbar Tlbar
Align = 1 'Align Top
Height = 504
Left = 0
TabIndex = 0
Top = 0
Width = 8592
_ExtentX = 15161
_ExtentY = 900
ButtonWidth = 609
ButtonHeight = 847
Appearance = 1
Style = 1
ImageList = "ImList"
_Version = 393216
End
Begin VB.Menu popMenu
Caption = ""
Visible = 0 'False
Begin VB.Menu stock
Caption = "股票..."
End
Begin VB.Menu h
Caption = "-"
End
Begin VB.Menu analysis
Caption = "分析..."
End
Begin VB.Menu g
Caption = "-"
End
Begin VB.Menu user
Caption = "用户..."
End
Begin VB.Menu f
Caption = "-"
End
Begin VB.Menu about
Caption = "关于..."
End
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
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 Sub about_Click()
frmAbout.Show
End Sub
Private Sub analysis_Click()
frmAnalysis.Show
End Sub
Private Sub Form_Unload(Cancel As Integer)
End
End Sub
Private Sub stock_Click()
frmStock.Show
End Sub
Private Sub user_Click()
frmUser.Show
End Sub
Private Sub Form_Load()
'状态栏增加一个窗格
sbrDB.Panels.add
sbrDB.Panels.add
'工具栏增加按钮,设置参数索引,键值,名称和图像
Tlbar.Buttons.add 1, "stock", "股票", , "stock" '工具栏增加一个按钮
Tlbar.Buttons.add 2, , , tbrSeparator '分隔符
Tlbar.Buttons.add 3, "analysis", "分析", , "analysis"
Tlbar.Buttons.add 4, , , tbrSeparator
Tlbar.Buttons.add 5, "user", "用户", , "user"
Tlbar.Buttons.add 6, , , tbrSeparator
Tlbar.Buttons.add 7, "about", "关于", , "about"
Tlbar.Buttons.add 8, , , tbrSeparator
Tlbar.Buttons.add 9, "exit", "退出", , "exit"
'为状态栏添加图像
sbrDB.Panels(1).Picture = LoadPicture(App.Path & "\Emply.ico")
sbrDB.Panels(2).Picture = LoadPicture(App.Path & "\Clock01.ico")
sbrDB.Panels(1).Width = 2000
sbrDB.Panels(2).Width = 2000
'设置状态栏内容
sbrDB.Panels(1).Text = "User:" & Trim(g_UserName)
sbrDB.Panels(2).Text = frmLogin.txtDate.Text
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, x As Single, Y As Single)
If Button = vbRightButton Then
frmMain.PopupMenu popMenu
End If
End Sub
Private Sub MDIForm_Unload(Cancel As Integer)
Dim strMsg As String
Dim rt As VbMsgBoxResult
strMsg = "您确定退出吗?"
rt = MsgBox(strMsg, vbQuestion + vbOKCancel + vbDefaultButton1, "股票分析系统")
If rt = vbOK Then
Cancel = False
End
Else
Cancel = True
End If
End Sub
Private Sub Timer1_Timer()
sbrDB.Panels(3).Text = Time
End Sub
'处理工具栏点击消息
Private Sub Tlbar_ButtonClick(ByVal Button As MSComctlLib.Button)
Dim strMsg As String
'比较按钮的关键值,分别弹出相应的窗口
Select Case Button.Key
Case "stock"
frmStock.Show
Case "analysis"
frmAnalysis.Show
Case "user"
frmUser.Show vbModal
Case "about"
frmAbout.Show vbModal
Case "exit" '退出时的处理代码
strMsg = "您确定退出吗?"
Unload Me
End Select
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -