home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / PVb5.0 / VB / SAMPLES / PGUIDE / OPTIMIZE / FRMIMAGE.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-01-19  |  4.0 KB  |  139 lines

  1. VERSION 5.00
  2. Begin VB.Form frmImages 
  3.    AutoRedraw      =   -1  'True
  4.    Caption         =   "Image 
  5.    ClientHeight    =   3810
  6.    ClientLeft      =   7035
  7.    ClientTop       =   1755
  8.    ClientWidth     =   4320
  9.    ClipControls    =   0   'False
  10.    ForeColor       =   &H80000008&
  11.    LinkTopic       =   "Form5"
  12.    PaletteMode     =   1  'UseZOrder
  13.    ScaleHeight     =   3810
  14.    ScaleWidth      =   4320
  15.    Tag             =   "Apparent"
  16.    WhatsThisHelp   =   -1  'True
  17.    Begin VB.CommandButton cmdExit 
  18.       Caption         =   "
  19. (&X)"
  20.       Default         =   -1  'True
  21.       Height          =   495
  22.       Left            =   1545
  23.       TabIndex        =   0
  24.       Top             =   3240
  25.       Width           =   1215
  26.    End
  27.    Begin VB.Image Image1 
  28.       Appearance      =   0  'Flat
  29.       Height          =   480
  30.       Index           =   9
  31.       Left            =   840
  32.       Picture         =   "frmimage.frx":0000
  33.       Top             =   360
  34.       Width           =   480
  35.    End
  36.    Begin VB.Image Image1 
  37.       Appearance      =   0  'Flat
  38.       Height          =   480
  39.       Index           =   8
  40.       Left            =   1680
  41.       Picture         =   "frmimage.frx":030A
  42.       Top             =   600
  43.       Width           =   480
  44.    End
  45.    Begin VB.Image Image1 
  46.       Appearance      =   0  'Flat
  47.       Height          =   480
  48.       Index           =   7
  49.       Left            =   330
  50.       Picture         =   "frmimage.frx":0614
  51.       Top             =   2040
  52.       Width           =   480
  53.    End
  54.    Begin VB.Image Image1 
  55.       Appearance      =   0  'Flat
  56.       Height          =   480
  57.       Index           =   6
  58.       Left            =   600
  59.       Picture         =   "frmimage.frx":091E
  60.       Top             =   1320
  61.       Width           =   480
  62.    End
  63.    Begin VB.Image Image1 
  64.       Appearance      =   0  'Flat
  65.       Height          =   480
  66.       Index           =   5
  67.       Left            =   1470
  68.       Picture         =   "frmimage.frx":0C28
  69.       Top             =   1740
  70.       Width           =   480
  71.    End
  72.    Begin VB.Image Image1 
  73.       Appearance      =   0  'Flat
  74.       Height          =   480
  75.       Index           =   4
  76.       Left            =   2235
  77.       Picture         =   "frmimage.frx":0F32
  78.       Top             =   1245
  79.       Width           =   480
  80.    End
  81.    Begin VB.Image Image1 
  82.       Appearance      =   0  'Flat
  83.       Height          =   480
  84.       Index           =   3
  85.       Left            =   3075
  86.       Picture         =   "frmimage.frx":123C
  87.       Top             =   450
  88.       Width           =   480
  89.    End
  90.    Begin VB.Image Image1 
  91.       Appearance      =   0  'Flat
  92.       Height          =   480
  93.       Index           =   2
  94.       Left            =   1200
  95.       Picture         =   "frmimage.frx":1546
  96.       Top             =   2520
  97.       Width           =   480
  98.    End
  99.    Begin VB.Image Image1 
  100.       Appearance      =   0  'Flat
  101.       Height          =   480
  102.       Index           =   1
  103.       Left            =   2400
  104.       Picture         =   "frmimage.frx":1850
  105.       Top             =   2520
  106.       Width           =   480
  107.    End
  108.    Begin VB.Image Image1 
  109.       Appearance      =   0  'Flat
  110.       Height          =   480
  111.       Index           =   0
  112.       Left            =   3120
  113.       Picture         =   "frmimage.frx":1B5A
  114.       Top             =   1680
  115.       Width           =   480
  116.    End
  117. Attribute VB_Name = "frmImages"
  118. Attribute VB_GlobalNameSpace = False
  119. Attribute VB_Creatable = False
  120. Attribute VB_PredeclaredId = True
  121. Attribute VB_Exposed = False
  122. Private Sub cmdExit_Click()
  123.   Unload Me
  124. End Sub
  125. Private Sub Form_Load()
  126.   PosForm Me
  127.   Me.Show
  128.   ScrambleDisks
  129. End Sub
  130. Private Sub ScrambleDisks()
  131.   iMaxWidth = Me.ScaleWidth - Image1(0).Width + 1
  132.   iMaxHeight = Me.ScaleWidth - Image1(0).Height + 1
  133.   For iCounter = 1 To 5
  134.     For iDiskImage = 0 To 9
  135.       Image1(iDiskImage).Move Int(iMaxWidth * Rnd), Int(iMaxHeight * Rnd)
  136.     Next iDiskImage
  137.   Next iCounter
  138. End Sub
  139.