home *** CD-ROM | disk | FTP | other *** search
Wrap
VERSION 2.00 Begin Form Form1 BorderStyle = 1 'Fixed Single ClientHeight = 2205 ClientLeft = 4050 ClientTop = 3000 ClientWidth = 4155 ControlBox = 0 'False Height = 2730 Left = 3990 LinkTopic = "Form1" MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 2205 ScaleWidth = 4155 Top = 2535 Width = 4275 Begin PictureBox Picture3 AutoRedraw = -1 'True AutoSize = -1 'True BorderStyle = 0 'None Height = 480 Left = 1200 Picture = RING.FRX:0000 ScaleHeight = 480 ScaleWidth = 480 TabIndex = 3 Top = 1320 Width = 480 End Begin PictureBox Picture1 AutoRedraw = -1 'True AutoSize = -1 'True BorderStyle = 0 'None Height = 480 Left = 720 Picture = RING.FRX:0302 ScaleHeight = 480 ScaleWidth = 480 TabIndex = 0 Top = 1320 Width = 480 End Begin PictureBox Picture4 AutoSize = -1 'True BorderStyle = 0 'None Height = 495 Left = 480 ScaleHeight = 495 ScaleWidth = 495 TabIndex = 4 Top = 720 Width = 495 End Begin Timer Timer2 Enabled = 0 'False Interval = 50 Left = 1920 Top = 480 End Begin Timer Timer1 Enabled = 0 'False Interval = 600 Left = 1800 Top = 240 End Begin CommandButton Command1 Caption = "Ring my Bell" Height = 495 Left = 120 TabIndex = 2 Top = 120 Width = 1215 End Begin PictureBox Picture2 AutoRedraw = -1 'True AutoSize = -1 'True BorderStyle = 0 'None Height = 480 Left = 240 Picture = RING.FRX:0604 ScaleHeight = 480 ScaleWidth = 480 TabIndex = 1 Top = 1320 Width = 480 End Declare Function sndPlaySound Lib "MMSYSTEM.DLL" (ByVal lpszSoundName As String, ByVal wFlags As Integer) As Integer Declare Function BitBlt Lib "GDI" (ByVal hDestDC As Integer, ByVal x As Integer, ByVal Y As Integer, ByVal nWidth As Integer, ByVal nHeight As Integer, ByVal hSrcDC As Integer, ByVal XSrc As Integer, ByVal YSrc As Integer, ByVal dwRop As Long) As Integer Const SRCCOPY = &HCC0020 Const SND_ASYNC = &H1 Const SND_NODEFAULT = &H2 Sub Command1_Click () Timer1.Enabled = True End Sub Sub Timer1_Timer () Static Ringing As Integer Dim Result As Integer If Ringing Then Result = BitBlt(Picture4.hDC, 0, 0, 32, 32, Picture2.hDC, 0, 0, SRCCOPY) Timer2.Enabled = False Result = sndPlaySound("c:\windows\ringin.wav", SND_ASYNC Or SND_NODEFAULT) Timer2.Enabled = True End If Ringing = Not Ringing End Sub Sub Timer2_Timer () Static Toggle As Integer Dim Result As Integer If Toggle Then Result = BitBlt(Picture4.hDC, 0, 0, 32, 32, Picture1.hDC, 0, 0, SRCCOPY) Result = BitBlt(Picture4.hDC, 0, 0, 32, 32, Picture3.hDC, 0, 0, SRCCOPY) End If Toggle = Not Toggle End Sub