home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / code / grafik / anmati / flag.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-02-27  |  3.6 KB  |  114 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    BorderStyle     =   1  'Fixed Single
  4.    ClientHeight    =   2130
  5.    ClientLeft      =   1785
  6.    ClientTop       =   2985
  7.    ClientWidth     =   3240
  8.    ControlBox      =   0   'False
  9.    Height          =   2655
  10.    Left            =   1725
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   2130
  15.    ScaleWidth      =   3240
  16.    Top             =   2520
  17.    Width           =   3360
  18.    Begin PictureBox Picture1 
  19.       AutoRedraw      =   -1  'True
  20.       AutoSize        =   -1  'True
  21.       BorderStyle     =   0  'None
  22.       Height          =   480
  23.       Index           =   4
  24.       Left            =   1920
  25.       Picture         =   FLAG.FRX:0000
  26.       ScaleHeight     =   480
  27.       ScaleWidth      =   480
  28.       TabIndex        =   5
  29.       Top             =   1320
  30.       Width           =   480
  31.    End
  32.    Begin PictureBox Picture1 
  33.       AutoRedraw      =   -1  'True
  34.       AutoSize        =   -1  'True
  35.       BorderStyle     =   0  'None
  36.       Height          =   480
  37.       Index           =   3
  38.       Left            =   1320
  39.       Picture         =   FLAG.FRX:0302
  40.       ScaleHeight     =   480
  41.       ScaleWidth      =   480
  42.       TabIndex        =   3
  43.       Top             =   1320
  44.       Width           =   480
  45.    End
  46.    Begin PictureBox Picture1 
  47.       AutoRedraw      =   -1  'True
  48.       AutoSize        =   -1  'True
  49.       BorderStyle     =   0  'None
  50.       Height          =   480
  51.       Index           =   1
  52.       Left            =   120
  53.       Picture         =   FLAG.FRX:0604
  54.       ScaleHeight     =   480
  55.       ScaleWidth      =   480
  56.       TabIndex        =   0
  57.       Top             =   1320
  58.       Width           =   480
  59.    End
  60.    Begin PictureBox Picture5 
  61.       AutoSize        =   -1  'True
  62.       BorderStyle     =   0  'None
  63.       Height          =   495
  64.       Left            =   480
  65.       ScaleHeight     =   495
  66.       ScaleWidth      =   495
  67.       TabIndex        =   4
  68.       Top             =   720
  69.       Width           =   495
  70.    End
  71.    Begin Timer Timer2 
  72.       Enabled         =   0   'False
  73.       Interval        =   100
  74.       Left            =   1920
  75.       Top             =   480
  76.    End
  77.    Begin CommandButton Command1 
  78.       Caption         =   "Wave My Flag"
  79.       Height          =   495
  80.       Left            =   120
  81.       TabIndex        =   2
  82.       Top             =   120
  83.       Width           =   1335
  84.    End
  85.    Begin PictureBox Picture1 
  86.       AutoRedraw      =   -1  'True
  87.       AutoSize        =   -1  'True
  88.       BorderStyle     =   0  'None
  89.       Height          =   480
  90.       Index           =   2
  91.       Left            =   720
  92.       Picture         =   FLAG.FRX:0906
  93.       ScaleHeight     =   480
  94.       ScaleWidth      =   480
  95.       TabIndex        =   1
  96.       Top             =   1320
  97.       Width           =   480
  98.    End
  99. Declare Function sndPlaySound Lib "MMSYSTEM.DLL" (ByVal lpszSoundName As String, ByVal wFlags As Integer) As Integer
  100. 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
  101. Const SRCCOPY = &HCC0020
  102. Const SND_ASYNC = &H1
  103. Const SND_NODEFAULT = &H2
  104. Sub Command1_Click ()
  105. Timer2.Enabled = True
  106. End Sub
  107. Sub Timer2_Timer ()
  108. Static flag As Integer
  109. Dim Result As Integer
  110. flag = flag + 1
  111. If flag = 5 Then flag = 1
  112. Result = BitBlt(Picture5.hDC, 0, 0, 32, 32, Picture1(flag).hDC, 0, 0, SRCCOPY)
  113. End Sub
  114.