home *** CD-ROM | disk | FTP | other *** search
/ PC Users 1998 November / Cd users extra 14.iso / prog / inst / optimize / optimize.frm (.txt) next >
Encoding:
Visual Basic Form  |  1995-01-09  |  2.7 KB  |  90 lines

  1. VERSION 4.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   4095
  5.    ClientLeft      =   960
  6.    ClientTop       =   1530
  7.    ClientWidth     =   4845
  8.    Height          =   4500
  9.    Icon            =   "Optimize.frx":0000
  10.    Left            =   900
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   4095
  13.    ScaleWidth      =   4845
  14.    Top             =   1185
  15.    Width           =   4965
  16.    Begin VB.CommandButton Command2 
  17.       Caption         =   "Add 500 Items With Optimization"
  18.       BeginProperty Font 
  19.          name            =   "MS Sans Serif"
  20.          charset         =   0
  21.          weight          =   700
  22.          size            =   8.25
  23.          underline       =   0   'False
  24.          italic          =   0   'False
  25.          strikethrough   =   0   'False
  26.       EndProperty
  27.       Height          =   435
  28.       Left            =   60
  29.       TabIndex        =   2
  30.       Top             =   480
  31.       Width           =   4695
  32.    End
  33.    Begin VB.CommandButton Command1 
  34.       Caption         =   "Add 500 Items Without Optimization"
  35.       Height          =   375
  36.       Left            =   60
  37.       TabIndex        =   1
  38.       Top             =   60
  39.       Width           =   4695
  40.    End
  41.    Begin ComctlLib.ListView ListView1 
  42.       Height          =   3015
  43.       Left            =   60
  44.       TabIndex        =   0
  45.       Top             =   960
  46.       Width           =   4635
  47.       _Version        =   65536
  48.       _ExtentX        =   8176
  49.       _ExtentY        =   5318
  50.       _StockProps     =   205
  51.       ForeColor       =   -2147483640
  52.       BackColor       =   -2147483643
  53.       Appearance      =   1
  54.       Icons           =   ""
  55.       SmallIcons      =   ""
  56.       NumItems        =   1
  57.       i1              =   "Optimize.frx":0442
  58.    End
  59. Attribute VB_Name = "Form1"
  60. Attribute VB_Creatable = False
  61. Attribute VB_Exposed = False
  62. Option Explicit
  63. Private Declare Sub InvalidateRect Lib "user32" (ByVal hWnd As Long, ByVal t As Long, ByVal bErase As Long)
  64. Private Declare Sub ValidateRect Lib "user32" (ByVal hWnd As Long, ByVal t As Long)
  65. Private Sub Command1_Click()
  66.     Dim I As Long
  67.     ListView1.View = 3
  68.     With ListView1.ListItems
  69.         .Clear
  70.         For I = 1 To 500
  71.             .Add , , "test " & CStr(I)
  72.             DoEvents
  73.         Next I
  74.     End With
  75. End Sub
  76. Private Sub Command2_Click()
  77.     Dim I As Long
  78.     ListView1.View = 3
  79.     With ListView1.ListItems
  80.         .Clear
  81.         For I = 1 To 500
  82.             .Add , , "test " & CStr(I)
  83.              ValidateRect ListView1.hWnd, 0&
  84.              If (I Mod 10) = 0 Then InvalidateRect ListView1.hWnd, 0&, 0&
  85.              DoEvents
  86.         Next I
  87.     End With
  88.     InvalidateRect ListView1.hWnd, 0&, 0&
  89. End Sub
  90.