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

  1. VERSION 5.00
  2. Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.1#0"; "COMCTL32.OCX"
  3. Begin VB.Form Pictures 
  4.    AutoRedraw      =   -1  'True
  5.    Caption         =   "PictureBox 
  6.  Image 
  7.    ClientHeight    =   3495
  8.    ClientLeft      =   2100
  9.    ClientTop       =   2085
  10.    ClientWidth     =   6390
  11.    ForeColor       =   &H80000008&
  12.    LinkTopic       =   "Form4"
  13.    PaletteMode     =   1  'UseZOrder
  14.    ScaleHeight     =   233
  15.    ScaleMode       =   3  'Pixel
  16.    ScaleWidth      =   426
  17.    Tag             =   "Display"
  18.    WhatsThisHelp   =   -1  'True
  19.    Begin VB.PictureBox Picture1 
  20.       Appearance      =   0  'Flat
  21.       AutoRedraw      =   -1  'True
  22.       AutoSize        =   -1  'True
  23.       BackColor       =   &H80000005&
  24.       BeginProperty Font 
  25.          Name            =   "
  26.          Size            =   9
  27.          Charset         =   134
  28.          Weight          =   700
  29.          Underline       =   0   'False
  30.          Italic          =   0   'False
  31.          Strikethrough   =   0   'False
  32.       EndProperty
  33.       ForeColor       =   &H80000008&
  34.       Height          =   2280
  35.       Index           =   0
  36.       Left            =   3240
  37.       Picture         =   "FRMPICS.frx":0000
  38.       ScaleHeight     =   2250
  39.       ScaleWidth      =   3000
  40.       TabIndex        =   0
  41.       Top             =   480
  42.       Width           =   3030
  43.    End
  44.    Begin ComctlLib.StatusBar sbStatus 
  45.       Align           =   2  'Align Bottom
  46.       Height          =   285
  47.       Left            =   0
  48.       TabIndex        =   1
  49.       Top             =   3210
  50.       Width           =   6390
  51.       _ExtentX        =   11271
  52.       _ExtentY        =   503
  53.       Style           =   1
  54.       SimpleText      =   ""
  55.       BeginProperty Panels {0713E89E-850A-101B-AFC0-4210102A8DA7} 
  56.          NumPanels       =   1
  57.          BeginProperty Panel1 {0713E89F-850A-101B-AFC0-4210102A8DA7} 
  58.             AutoSize        =   1
  59.             Object.Width           =   10716
  60.             TextSave        =   ""
  61.             Object.Tag             =   ""
  62.          EndProperty
  63.       EndProperty
  64.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  65.          Name            =   "
  66.          Size            =   9
  67.          Charset         =   134
  68.          Weight          =   400
  69.          Underline       =   0   'False
  70.          Italic          =   0   'False
  71.          Strikethrough   =   0   'False
  72.       EndProperty
  73.    End
  74.    Begin VB.Label Label3 
  75.       Caption         =   "
  76.       Height          =   255
  77.       Left            =   2160
  78.       TabIndex        =   4
  79.       Top             =   2880
  80.       Width           =   2415
  81.    End
  82.    Begin VB.Label Label2 
  83.       Caption         =   "PictureBox 
  84.       Height          =   375
  85.       Left            =   3840
  86.       TabIndex        =   3
  87.       Top             =   120
  88.       Width           =   1935
  89.    End
  90.    Begin VB.Label Label1 
  91.       Caption         =   "Image 
  92.       Height          =   255
  93.       Left            =   840
  94.       TabIndex        =   2
  95.       Top             =   120
  96.       Width           =   2055
  97.    End
  98.    Begin VB.Image Image1 
  99.       Appearance      =   0  'Flat
  100.       Height          =   2250
  101.       Index           =   0
  102.       Left            =   120
  103.       Picture         =   "FRMPICS.frx":7972
  104.       Top             =   480
  105.       Width           =   3000
  106.    End
  107. Attribute VB_Name = "Pictures"
  108. Attribute VB_GlobalNameSpace = False
  109. Attribute VB_Creatable = False
  110. Attribute VB_PredeclaredId = True
  111. Attribute VB_Exposed = False
  112. Private Sub Form_Load()
  113.   PosForm Me
  114. End Sub
  115. Private Sub Form_Unload(Cancel As Integer)
  116.     Set frmPics = Nothing
  117. End Sub
  118. Private Sub Image1_Click(Index As Integer)
  119.   On Error Resume Next
  120.   Dim i As Integer, j As Integer
  121.   Screen.MousePointer = vbHourglass
  122.     i = 1
  123.     Do
  124.         Load Image1(i)
  125.         Image1(i).Move Image1(i - 1).Left + 4, Image1(i - 1).Top + 4
  126.         Image1(i).Visible = True
  127.         i = i + 1
  128.         If i Mod 20 = 0 Then
  129.           sbStatus.SimpleText = Str$(i) & " 
  130.  Image 
  131.           DoEvents
  132.         End If
  133.     Loop Until Err Or i = 5000
  134.     For j = i To 1 Step -1
  135.         Unload Image1(i)
  136.         Set Image1(i) = Nothing
  137.     Next j
  138.     frmPictures.Refresh
  139.     frmExplore.Refresh
  140.     MsgBox "
  141.  " & Str$(i) & " 
  142.  Image 
  143. ", vbInformation, "Image 
  144.     Screen.MousePointer = vbDefault
  145. End Sub
  146. Private Sub Picture1_Click(Index As Integer)
  147. On Error Resume Next
  148. Dim i As Integer, j As Integer
  149.     i = 1
  150.     Screen.MousePointer = vbHourglass
  151.     Do
  152.         Load Picture1(i)
  153.         Picture1(i).Move Picture1(i - 1).Left + 4, Picture1(i - 1).Top + 4
  154.         Picture1(i).Visible = True
  155.         If i Mod 20 = 0 Then
  156.           sbStatus.SimpleText = Str$(i) & " Picture 
  157.           sbStatus.Refresh
  158.         End If
  159.         i = i + 1
  160.     Loop Until Err
  161.     sbStatus.SimpleText = Str$(i) & " 
  162.  Picture 
  163.     sbStatus.Refresh
  164.     For j = i To 1 Step -1
  165.         Unload Picture1(i)
  166.         Set Picture1(i) = Nothing
  167.     Next j
  168.     frmPictures.Refresh
  169.     frmExplore.Refresh
  170.     Screen.MousePointer = vbDefault
  171.     MsgBox "
  172.  " & Str$(i) & " 
  173.  Picture 
  174. ", vbInformation, "Picture 
  175. End Sub
  176.