⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frm_mainconsole.frm

📁 vb+sql2
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frm_mainconsole 
   BorderStyle     =   0  'None
   Caption         =   "通用教材管理系统1.0.1"
   ClientHeight    =   10380
   ClientLeft      =   3420
   ClientTop       =   300
   ClientWidth     =   8700
   ControlBox      =   0   'False
   Icon            =   "frm_mainconsole.frx":0000
   LinkTopic       =   "Form1"
   Picture         =   "frm_mainconsole.frx":0442
   ScaleHeight     =   10380
   ScaleWidth      =   8700
   ShowInTaskbar   =   0   'False
   Begin VB.Timer Timer1 
      Enabled         =   0   'False
      Interval        =   10
      Left            =   3480
      Top             =   9000
   End
   Begin VB.PictureBox pic_exit 
      Appearance      =   0  'Flat
      AutoSize        =   -1  'True
      BackColor       =   &H80000005&
      BorderStyle     =   0  'None
      ForeColor       =   &H80000008&
      Height          =   315
      Left            =   8280
      Picture         =   "frm_mainconsole.frx":1082C
      ScaleHeight     =   315
      ScaleWidth      =   315
      TabIndex        =   2
      ToolTipText     =   "退出"
      Top             =   200
      Width           =   315
   End
   Begin VB.Label lab_help 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "版本信息"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   18
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   360
      Left            =   1800
      MouseIcon       =   "frm_mainconsole.frx":12E7B
      MousePointer    =   99  'Custom
      TabIndex        =   10
      Top             =   8160
      Width           =   1440
   End
   Begin VB.Image Image6 
      Height          =   480
      Left            =   960
      Picture         =   "frm_mainconsole.frx":13185
      Top             =   8040
      Width           =   480
   End
   Begin VB.Label lab_username 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "用户名"
      Height          =   195
      Left            =   6480
      TabIndex        =   9
      Top             =   10080
      Width           =   540
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "当前登录用户:"
      Height          =   195
      Left            =   4920
      TabIndex        =   8
      Top             =   10080
      Width           =   1260
   End
   Begin VB.Label lab_setting 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "系统设置"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   18
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   495
      Left            =   1800
      MouseIcon       =   "frm_mainconsole.frx":1348F
      MousePointer    =   99  'Custom
      TabIndex        =   7
      Top             =   7080
      Width           =   1455
   End
   Begin VB.Label lab_printing 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "报表打印"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   18
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   495
      Left            =   1800
      MouseIcon       =   "frm_mainconsole.frx":13799
      MousePointer    =   99  'Custom
      TabIndex        =   6
      Top             =   5880
      Width           =   1455
   End
   Begin VB.Label lab_usermanagement 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "用户管理"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   18
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   495
      Left            =   1800
      MouseIcon       =   "frm_mainconsole.frx":13AA3
      MousePointer    =   99  'Custom
      TabIndex        =   5
      Top             =   4680
      Width           =   1455
   End
   Begin VB.Label lab_libmanagement 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "图书管理"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   18
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   495
      Left            =   1800
      MouseIcon       =   "frm_mainconsole.frx":13DAD
      MousePointer    =   99  'Custom
      TabIndex        =   4
      Top             =   3480
      Width           =   1455
   End
   Begin VB.Label lab_ordering 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "图书订单"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   18
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   495
      Left            =   1800
      MouseIcon       =   "frm_mainconsole.frx":140B7
      MousePointer    =   99  'Custom
      TabIndex        =   3
      Top             =   2400
      Width           =   1455
   End
   Begin VB.Image Image5 
      Height          =   480
      Left            =   960
      Picture         =   "frm_mainconsole.frx":143C1
      Top             =   2280
      Width           =   480
   End
   Begin VB.Image Image4 
      Height          =   480
      Left            =   960
      Picture         =   "frm_mainconsole.frx":14803
      Top             =   6885
      Width           =   480
   End
   Begin VB.Image Image3 
      Height          =   480
      Left            =   960
      Picture         =   "frm_mainconsole.frx":150CD
      Top             =   5730
      Width           =   480
   End
   Begin VB.Image Image2 
      Height          =   480
      Left            =   960
      Picture         =   "frm_mainconsole.frx":153D7
      Top             =   4590
      Width           =   480
   End
   Begin VB.Image Image1 
      Height          =   480
      Left            =   960
      Picture         =   "frm_mainconsole.frx":156E1
      Top             =   3435
      Width           =   480
   End
   Begin VB.Label lab_time 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "时间"
      Height          =   195
      Left            =   2160
      TabIndex        =   1
      Top             =   10080
      Width           =   360
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "系统时间:"
      Height          =   195
      Left            =   240
      TabIndex        =   0
      Top             =   10080
      Width           =   900
   End
End
Attribute VB_Name = "frm_mainconsole"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Dim MoveScreen As Boolean

'鼠标位置
Dim MousX As Integer
Dim MousY As Integer
'窗体位置
Dim CurrX As Integer
Dim CurrY As Integer

Private Sub Form_Load()
        lab_time.Caption = Now
        lab_username.Caption = username
End Sub

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
        '如果是鼠标左键按下
        If Button = 1 Then
        '标示为移动状态
        MoveScreen = True
        '得到鼠标在窗体上的位置(相对与窗体内部坐标)
        MousX = X
        MousY = Y
        End If
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
        If MoveScreen Then
        '计算新的窗体坐标值
        CurrX = frm_mainconsole.Left - MousX + X
        CurrY = frm_mainconsole.Top - MousY + Y
        '移动窗体到新的位置
        frm_mainconsole.Move CurrX, CurrY
        End If
End Sub

Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
        MoveScreen = False
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
        Dim IntR As Integer
        IntR = MsgBox("确认要退出程序吗?", vbYesNo, "退出确认")
        If IntR = vbNo Then Cancel = -1 '
End Sub

Private Sub Form_Unload(Cancel As Integer)
        End
End Sub

Private Sub lab_help_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
        lab_help.Top = 8180
         frm_about.Show 1
End Sub

Private Sub lab_help_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
        lab_help.Top = 8160
End Sub

Private Sub lab_libmanagement_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
        lab_libmanagement.Top = 3500
        frm_fetchbook.Show
        frm_mainconsole.Hide
End Sub

Private Sub lab_libmanagement_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
        lab_libmanagement.Top = 3480
End Sub

Private Sub lab_ordering_Click()
        frm_ordering.Show
End Sub

Private Sub lab_ordering_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
        lab_ordering.Top = 2420
End Sub

Private Sub lab_ordering_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
        lab_ordering.Top = 2400
End Sub

Private Sub lab_printing_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
        lab_printing.Top = 5900
        frm_printing.Show
        frm_mainconsole.Hide
End Sub

Private Sub lab_printing_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
        lab_printing.Top = 5880
End Sub

Private Sub lab_setting_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
        lab_setting.Top = 7025
        frm_sys_m.Show
        frm_mainconsole.Hide
End Sub

Private Sub lab_setting_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
        lab_setting.Top = 7005
End Sub

Private Sub lab_usermanagement_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
        lab_usermanagement.Top = 4700
        frm_xtglydl.Show
        frm_mainconsole.Hide
End Sub

Private Sub lab_usermanagement_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
        lab_usermanagement.Top = 4680
End Sub

Private Sub pic_exit_Click()
         Unload Me
End Sub

Private Sub pic_exit_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
        If (X <= 315 And X >= 0) And (Y <= 315 And Y >= 0) Then
        pic_exit.Picture = LoadPicture(App.Path + "\endbox_sm2.jpg")
        Timer1.Enabled = True
        End If
End Sub

Private Sub pic_ordering_Click()
        frm_ordering.Show
        Me.Hide
End Sub

Private Sub Timer1_Timer()
        Dim MousePosition As POINTAPI
        Dim ReturnValue As Long
        Dim HwndHoverWindow As Long
        ReturnValue = GetCursorPos(MousePosition)
        HwndHoverWindow = WindowFromPoint(MousePosition.X, MousePosition.Y)
        If HwndHoverWindow = frm_mainconsole.hWnd Then
        pic_exit.Picture = LoadPicture(App.Path + "\endbox_sm.jpg")
        Timer1.Enabled = False
        Else
        
        End If
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -