home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form frmSplash
- BorderStyle = 3 'Fixed Dialog
- ClientHeight = 450
- ClientLeft = 1155
- ClientTop = 2595
- ClientWidth = 5400
- ControlBox = 0 'False
- Height = 855
- Left = 1095
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 450
- ScaleWidth = 5400
- Top = 2250
- Width = 5520
- Begin VB.Label lblMessage
- Alignment = 2 'Center
- BackStyle = 0 'Transparent
- Caption = "Label1"
- Height = 195
- Left = 135
- TabIndex = 0
- Top = 180
- Width = 5100
- End
- Attribute VB_Name = "frmSplash"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- '*********************************************************************
- ' FRMSPLASH - This is just a splash form that is used to display
- ' messages to the user during long processes.
- '*********************************************************************
- Option Explicit
- '*********************************************************************
- ' Declare SetWindowPos so this window can be "AlwaysOnTop".
- '*********************************************************************
- #If Win32 Then
- Private Declare Sub 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)
- #Else
- Private Declare Function SetWindowPos Lib "User" (ByVal hWnd%, _
- ByVal hb%, ByVal X%, ByVal Y%, ByVal cx%, ByVal cy%, _
- ByVal FLAGS%) As Integer
- #End If
- '*********************************************************************
- ' Inialize the form.
- '*********************************************************************
- Private Sub Form_Load()
- Const HWND_TOPMOST = -1
- Const SWP_NOMOVE = 2
- Const SWP_NOSIZE = 1
- Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE
- '*****************************************************************
- ' Set the mouse pointer.
- '*****************************************************************
- Screen.MousePointer = vbHourglass
- '*****************************************************************
- ' Set the window to TopMost, and ignore the return value.
- '*****************************************************************
- SetWindowPos hWnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS
- '*****************************************************************
- ' Reposition the label to the center of the form.
- '*****************************************************************
- lblMessage.Move (ScaleWidth - lblMessage.Width) / 2, _
- (ScaleHeight - lblMessage.Height) / 2
- Move (Screen.Width - Width) / 2, (Screen.Height - Height) / 2
- End Sub
- '*********************************************************************
- ' Restore the mouse pointer.
- '*********************************************************************
- Private Sub Form_Unload(Cancel As Integer)
- Screen.MousePointer = vbDefault
- End Sub
-