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

  1. VERSION 5.00
  2. Begin VB.Form Algorithms 
  3.    Appearance      =   0  'Flat
  4.    AutoRedraw      =   -1  'True
  5.    BackColor       =   &H00FFFFFF&
  6.    BorderStyle     =   3  'Fixed Dialog
  7.    Caption         =   "
  8.    ClientHeight    =   3810
  9.    ClientLeft      =   2265
  10.    ClientTop       =   1875
  11.    ClientWidth     =   6060
  12.    BeginProperty Font 
  13.       Name            =   "
  14.       Size            =   9
  15.       Charset         =   0
  16.       Weight          =   700
  17.       Underline       =   0   'False
  18.       Italic          =   0   'False
  19.       Strikethrough   =   0   'False
  20.    EndProperty
  21.    ForeColor       =   &H80000008&
  22.    LinkTopic       =   "Form1"
  23.    MaxButton       =   0   'False
  24.    MinButton       =   0   'False
  25.    PaletteMode     =   1  'UseZOrder
  26.    ScaleHeight     =   3810
  27.    ScaleWidth      =   6060
  28.    ShowInTaskbar   =   0   'False
  29.    Tag             =   "Display"
  30.    WhatsThisHelp   =   -1  'True
  31.    Begin VB.Frame Frame1 
  32.       Caption         =   "
  33.       BeginProperty Font 
  34.          Name            =   "
  35.          Size            =   9
  36.          Charset         =   134
  37.          Weight          =   400
  38.          Underline       =   0   'False
  39.          Italic          =   0   'False
  40.          Strikethrough   =   0   'False
  41.       EndProperty
  42.       Height          =   1695
  43.       Left            =   195
  44.       TabIndex        =   0
  45.       Top             =   120
  46.       Width           =   5655
  47.       Begin VB.CheckBox Check1 
  48.          Caption         =   "
  49.          BeginProperty Font 
  50.             Name            =   "
  51.             Size            =   9
  52.             Charset         =   134
  53.             Weight          =   400
  54.             Underline       =   0   'False
  55.             Italic          =   0   'False
  56.             Strikethrough   =   0   'False
  57.          EndProperty
  58.          Height          =   255
  59.          Left            =   240
  60.          TabIndex        =   6
  61.          Top             =   1200
  62.          Value           =   1  'Checked
  63.          Width           =   2175
  64.       End
  65.       Begin VB.OptionButton optLineStyle 
  66.          Caption         =   "
  67.          BeginProperty Font 
  68.             Name            =   "
  69.             Size            =   9
  70.             Charset         =   134
  71.             Weight          =   400
  72.             Underline       =   0   'False
  73.             Italic          =   0   'False
  74.             Strikethrough   =   0   'False
  75.          EndProperty
  76.          Height          =   375
  77.          Index           =   1
  78.          Left            =   240
  79.          TabIndex        =   2
  80.          Top             =   720
  81.          Width           =   2895
  82.       End
  83.       Begin VB.OptionButton optLineStyle 
  84.          Caption         =   "
  85.          BeginProperty Font 
  86.             Name            =   "
  87.             Size            =   9
  88.             Charset         =   134
  89.             Weight          =   400
  90.             Underline       =   0   'False
  91.             Italic          =   0   'False
  92.             Strikethrough   =   0   'False
  93.          EndProperty
  94.          Height          =   255
  95.          Index           =   0
  96.          Left            =   240
  97.          TabIndex        =   1
  98.          Top             =   360
  99.          Width           =   2775
  100.       End
  101.       Begin VB.Label Label1 
  102.          Appearance      =   0  'Flat
  103.          BackColor       =   &H80000005&
  104.          Caption         =   "Label1"
  105.          ForeColor       =   &H80000008&
  106.          Height          =   255
  107.          Left            =   240
  108.          TabIndex        =   5
  109.          Top             =   1200
  110.          Width           =   1455
  111.       End
  112.       Begin VB.Label lblAlgorithm 
  113.          Caption         =   "00.00 
  114.          BeginProperty Font 
  115.             Name            =   "
  116.             Size            =   9
  117.             Charset         =   134
  118.             Weight          =   400
  119.             Underline       =   0   'False
  120.             Italic          =   0   'False
  121.             Strikethrough   =   0   'False
  122.          EndProperty
  123.          Height          =   255
  124.          Index           =   1
  125.          Left            =   4080
  126.          TabIndex        =   4
  127.          Top             =   840
  128.          Width           =   1335
  129.       End
  130.       Begin VB.Label lblAlgorithm 
  131.          AutoSize        =   -1  'True
  132.          Caption         =   "00.00 
  133.          BeginProperty Font 
  134.             Name            =   "
  135.             Size            =   9
  136.             Charset         =   134
  137.             Weight          =   400
  138.             Underline       =   0   'False
  139.             Italic          =   0   'False
  140.             Strikethrough   =   0   'False
  141.          EndProperty
  142.          Height          =   180
  143.          Index           =   0
  144.          Left            =   4080
  145.          TabIndex        =   3
  146.          Top             =   360
  147.          Width           =   1215
  148.          WordWrap        =   -1  'True
  149.       End
  150.    End
  151. Attribute VB_Name = "Algorithms"
  152. Attribute VB_GlobalNameSpace = False
  153. Attribute VB_Creatable = False
  154. Attribute VB_PredeclaredId = True
  155. Attribute VB_Exposed = False
  156. Private Sub Check1_Click()
  157.     ' 
  158.  AutoRedraw 
  159.     Cls
  160.     Me.AutoRedraw = Not Me.AutoRedraw
  161. End Sub
  162. Private Sub Form_Load()
  163.   PosForm Me
  164.   Label1 = "
  165.  = " & Me.AutoRedraw
  166. End Sub
  167. Private Sub optLineStyle_Click(Index As Integer)
  168.     Cls
  169.     If optLineStyle(0) Then
  170.         start = Timer
  171.         For y = 1 To Me.ScaleHeight Step 5
  172.             Line (0, (Me.ScaleHeight - y))-(Me.ScaleWidth, (Me.ScaleHeight - y))
  173.         Next y
  174.         Finish = Timer
  175.         lblAlgorithm(0) = Format$(Finish - start, "##.##") & " 
  176.     Else
  177.         frmWidth = Me.ScaleWidth
  178.         frmHeight = Me.ScaleHeight
  179.         start = Timer
  180.         For y = 1 To frmHeight Step 5
  181.             x = frmHeight - y
  182.             Line (0, x)-(frmWidth, x)
  183.         Next y
  184.         Finish = Timer
  185.         lblAlgorithm(1) = Format$(Finish - start, "##.##") & " 
  186.     End If
  187. End Sub
  188.