home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form wFlash
- Caption = "Flashing Window"
- ClientHeight = 930
- ClientLeft = 1905
- ClientTop = 1635
- ClientWidth = 4020
- Height = 1335
- Left = 1845
- LinkTopic = "Form1"
- ScaleHeight = 930
- ScaleWidth = 4020
- Top = 1290
- Width = 4140
- Begin VB.CommandButton cbStop
- Caption = "&Stop"
- Height = 615
- Left = 2280
- TabIndex = 1
- Top = 135
- Width = 1215
- End
- Begin VB.CommandButton cbFlash
- Caption = "&Flash"
- Height = 615
- Left = 360
- TabIndex = 0
- Top = 135
- Width = 1215
- End
- Begin VB.Timer timerFlasher
- Enabled = 0 'False
- Left = 1770
- Top = 195
- End
- Attribute VB_Name = "wFlash"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- ' declarations differ between Windows 3.1 and Win32.
- #If Win16 Then
- Private Declare Function FlashWindow Lib "User" (ByVal hWnd As Integer, ByVal bInvert As Integer) As Integer
- #Else
- Private Declare Function FlashWindow Lib "User32" (ByVal hWnd As Long, ByVal bInvert As Long) As Long
- #End If
- Private Sub cbFlash_Click()
- timerFlasher.Interval = 500
- timerFlasher.Enabled = True
- End Sub
- Private Sub cbStop_Click()
- Dim iRet As Integer
- ' stop the flashing
- timerFlasher.Enabled = False
-
- ' Restore the window to its proper state
- iRet = FlashWindow(Me.hWnd, False)
- End Sub
- Private Sub Form_Load()
- ' make sure the timer isn
- t running when the program loads.
- timerFlasher.Enabled = False
- End Sub
- Private Sub timerFlasher_Timer()
- Dim iRet As Integer
- ' make the window flash
- iRet = FlashWindow(Me.hWnd, True)
- End Sub
-