home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1996 August / VPR9608A.BIN / vpr_data / vb32 / vb4wm / vb4-4.cab / butterf.frm < prev    next >
Text File  |  1996-01-12  |  3KB  |  92 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    BackColor       =   &H00FFFFFF&
  4.    Caption         =   "蝶"
  5.    ClientHeight    =   4005
  6.    ClientLeft      =   1230
  7.    ClientTop       =   1860
  8.    ClientWidth     =   7395
  9.    ClipControls    =   0   'False
  10.    BeginProperty Font 
  11.       name            =   "標準ゴシック"
  12.       charset         =   128
  13.       weight          =   400
  14.       size            =   9
  15.       underline       =   0   'False
  16.       italic          =   0   'False
  17.       strikethrough   =   0   'False
  18.    EndProperty
  19.    Height          =   4410
  20.    Left            =   1170
  21.    LinkTopic       =   "Form1"
  22.    ScaleHeight     =   267
  23.    ScaleMode       =   3  'ピクセル
  24.    ScaleWidth      =   493
  25.    Top             =   1515
  26.    Width           =   7515
  27.    WindowState     =   2  '最大表示
  28.    Begin VB.CommandButton Command1 
  29.       Caption         =   "終了(&X)"
  30.       Height          =   495
  31.       Left            =   6000
  32.       TabIndex        =   0
  33.       Top             =   3360
  34.       Width           =   1095
  35.    End
  36.    Begin VB.Timer Timer1 
  37.       Interval        =   200
  38.       Left            =   1890
  39.       Top             =   2940
  40.    End
  41.    Begin VB.Image Main 
  42.       Height          =   1155
  43.       Left            =   360
  44.       Picture         =   "BUTTERF.frx":0000
  45.       Top             =   2640
  46.       Width           =   1155
  47.    End
  48.    Begin VB.Image CloseWings 
  49.       Height          =   1155
  50.       Left            =   1920
  51.       Picture         =   "BUTTERF.frx":0C8A
  52.       Top             =   240
  53.       Visible         =   0   'False
  54.       Width           =   1155
  55.    End
  56.    Begin VB.Image OpenWings 
  57.       Height          =   1155
  58.       Left            =   360
  59.       Picture         =   "BUTTERF.frx":1914
  60.       Top             =   240
  61.       Visible         =   0   'False
  62.       Width           =   1155
  63.    End
  64. End
  65. Attribute VB_Name = "Form1"
  66. Attribute VB_Creatable = False
  67. Attribute VB_Exposed = False
  68.  
  69. Private Sub Command1_Click()
  70.     Unload Me
  71.     End
  72. End Sub
  73.  
  74. Private Sub Form_Load()
  75.     command1.Move 10, 10
  76. End Sub
  77.  
  78. Private Sub Timer1_Timer()
  79.      Static PickBmp As Integer
  80.      ' 蝶のピクチャを移動します。
  81.      Main.Move Main.Left + 20, Main.Top - 5
  82.      ' More メソッドを次のように変更すると蝶の飛び方が変わります。
  83.      ' Main.Move (Main.Left + 20) Mod ScaleWidth, (Main.Top - 5 + ScaleHeight) Mod ScaleHeight
  84.      If PickBmp Then
  85.         Main.Picture = OpenWings.Picture  ' 羽を開いた蝶のピクチャを表示します。
  86.      Else
  87.         Main.Picture = CloseWings.Picture ' 羽を閉じた蝶のピクチャを表示します。
  88.      End If
  89.      PickBmp = Not PickBmp                ' 値を切り替えます。
  90. End Sub
  91.  
  92.