tc.frm

来自「此程序是完成的土方调配」· FRM 代码 · 共 71 行

FRM
71
字号
VERSION 5.00
Begin VB.Form Form2 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "退出"
   ClientHeight    =   405
   ClientLeft      =   8205
   ClientTop       =   330
   ClientWidth     =   1110
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   405
   ScaleWidth      =   1110
   Begin VB.CommandButton Command1 
      Caption         =   "退出"
      Height          =   372
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   1092
   End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Const HWND_TOPMOST = -1
Private Const HWND_NOTOPMOST = -2
Private Declare Function SetWindowPos Lib "user32" ( _
ByVal hWnd As Long, _
ByVal hWndInsertAfter As Long, _
ByVal X As Long, _
ByVal Y As Long, _
ByVal cx As Long, _
ByVal cy As Long, _
ByVal wFlags As Long) As Long
Private mbOnTop As Boolean

Private Property Let OnTop(Setting As Boolean)
    If Setting Then
        SetWindowPos hWnd, -1, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE
    Else
        SetWindowPos hWnd, -2, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE
    End If
    mbOnTop = Setting
End Property

Private Property Get OnTop() As Boolean
'Return the private variable set in Property Let
OnTop = mbOnTop
End Property

Private Sub Command1_Click()
    Unload Form2
End Sub

Private Sub Form_Load()
    OnTop = True
 '   AppActivate "Microsoft Excel"
End Sub

Private Sub Form_Unload(Cancel As Integer)
    Form1.Show
    xlbook.Application.WindowState = xlMinimized
    'xlbook.Windows(1).Visible = False
    'xlbook.Application.Visible = False
End Sub


⌨️ 快捷键说明

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