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

📄 frmmsgbox.frm

📁 提供一个网吧管理系统的VB源代码供大家学习
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frmMsgBox 
   BorderStyle     =   1  'Fixed Single
   ClientHeight    =   1980
   ClientLeft      =   15
   ClientTop       =   15
   ClientWidth     =   5955
   ControlBox      =   0   'False
   Icon            =   "frmMsgBox.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1980
   ScaleWidth      =   5955
   StartUpPosition =   2  '屏幕中心
   Begin VB.Timer Timer1 
      Interval        =   100
      Left            =   2400
      Top             =   720
   End
   Begin VB.CommandButton Command2 
      Height          =   375
      Left            =   4320
      TabIndex        =   2
      Top             =   1440
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Height          =   375
      Left            =   2760
      TabIndex        =   1
      Top             =   1440
      Width           =   1215
   End
   Begin MSComctlLib.ProgressBar ProgressBar1 
      Height          =   375
      Left            =   360
      TabIndex        =   0
      Top             =   840
      Width           =   5415
      _ExtentX        =   9551
      _ExtentY        =   661
      _Version        =   393216
      Appearance      =   1
      Scrolling       =   1
   End
   Begin VB.Label Label2 
      Caption         =   "窗口将在15秒钟自动关闭"
      Height          =   255
      Left            =   360
      TabIndex        =   4
      Top             =   1440
      Width           =   2175
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Height          =   180
      Left            =   360
      TabIndex        =   3
      Top             =   120
      Width           =   450
   End
End
Attribute VB_Name = "frmMsgBox"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim tt As Long
Public Lentime As Integer

Private Declare Function mciExecute Lib "winmm.dll" (ByVal lpstrCommand As String) As Long



Private Sub Command1_Click()
If Command1.Caption = "确定" Then
 IsupperMsg = vbOK
Else
 IsupperMsg = vbYes
End If
Unload Me
End Sub

Private Sub Command2_Click()
If Command2.Caption = "取消" Then
 IsupperMsg = vbCancel
Else
 IsupperMsg = vbNo
End If

Unload Me
End Sub

Private Sub Form_Load()
tt = 0
Dim s As String
  ff = SystemPath + "notify.wav"
     s = String(LenB(ff), Chr(0))
    GetShortPathName ff, s, Len(s)
   '  MsgBox Len(s), , ff

 ff = Left(s, InStr(s, Chr(0)) - 1)
' MsgBox ff
mciExecute "sound " + ff
 
SetWindowPos Me.hwnd, -1, 0, 0, 0, 0, 1 Or 2

End Sub

Private Sub Form_Resize()
On Error Resume Next
ProgressBar1.Top = Label1.Top + Label1.Height + 200
Label2.Top = ProgressBar1.Top + ProgressBar1.Height + 200
Command1.Top = Label2.Top
Command2.Top = Label2.Top
Me.Height = Command1.Height + Command1.Top + 600
End Sub

Private Sub Form_Unload(Cancel As Integer)
'Command2_Click
End Sub

Private Sub Timer1_Timer()
On Error Resume Next
tt = tt + 1
ProgressBar1.Value = Int(100 * tt / (Lentime * 10))
If tt >= Lentime * 10 Then
 Command2_Click
End If
End Sub

⌨️ 快捷键说明

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