home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 25: Programming / pc_actual_25.iso / Delphi / PolarDraw / data1.cab / Samples / Visual_Basic / VBDraw / frmZoom.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2001-08-31  |  2.7 KB  |  85 lines

  1. VERSION 5.00
  2. Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
  3. Begin VB.Form frmZoom 
  4.    BorderStyle     =   3  'Fixed Dialog
  5.    Caption         =   "Zoom"
  6.    ClientHeight    =   1020
  7.    ClientLeft      =   45
  8.    ClientTop       =   330
  9.    ClientWidth     =   4860
  10.    Icon            =   "frmZoom.frx":0000
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   1020
  15.    ScaleWidth      =   4860
  16.    ShowInTaskbar   =   0   'False
  17.    StartUpPosition =   1  'CenterOwner
  18.    Begin VB.CommandButton btnCancel 
  19.       Caption         =   "Cancel"
  20.       Height          =   315
  21.       Left            =   3975
  22.       TabIndex        =   1
  23.       Top             =   645
  24.       Width           =   810
  25.    End
  26.    Begin VB.CommandButton btnOK 
  27.       Caption         =   "OK"
  28.       Height          =   315
  29.       Left            =   3975
  30.       TabIndex        =   0
  31.       Top             =   315
  32.       Width           =   810
  33.    End
  34.    Begin ComctlLib.Slider sldZoom 
  35.       Height          =   345
  36.       Left            =   30
  37.       TabIndex        =   3
  38.       Top             =   480
  39.       Width           =   3675
  40.       _ExtentX        =   6482
  41.       _ExtentY        =   609
  42.       _Version        =   327682
  43.       LargeChange     =   10
  44.       Min             =   10
  45.       Max             =   1000
  46.       SelStart        =   20
  47.       Value           =   20
  48.    End
  49.    Begin VB.Label lblZoom 
  50.       Caption         =   "Zoom:"
  51.       Height          =   225
  52.       Index           =   0
  53.       Left            =   240
  54.       TabIndex        =   2
  55.       Top             =   180
  56.       Width           =   1680
  57.    End
  58. Attribute VB_Name = "frmZoom"
  59. Attribute VB_GlobalNameSpace = False
  60. Attribute VB_Creatable = False
  61. Attribute VB_PredeclaredId = True
  62. Attribute VB_Exposed = False
  63. Dim lZoomValue As Long
  64. Private Sub btnCancel_Click()
  65.     'Setting the Zoom property to value it was set before dialog opened
  66.     pd_Environment.Zoom = lZoomValue
  67.     Unload Me
  68. End Sub
  69. Private Sub btnOK_Click()
  70.     pd_Environment.Zoom = sldZoom.Value
  71.     lblZoom(0) = "Zoom: " + CStr(sldZoom.Value) + "%"
  72.     Unload Me
  73. End Sub
  74. Private Sub Form_Load()
  75.     'Initialize lZoomValue which will store Zoom property in case user presses Cancel
  76.     lZoomValue = pd_Environment.Zoom
  77.     sldZoom.Value = pd_Environment.Zoom
  78.     lblZoom(0) = "Zoom: " + CStr(pd_Environment.Zoom) + "%"
  79. End Sub
  80. Private Sub sldZoom_Scroll()
  81.     'Changing slider value affects directly to Zoom property, so changes can be visible to the user
  82.     pd_Environment.Zoom = sldZoom.Value
  83.     lblZoom(0) = "Zoom: " + CStr(pd_Environment.Zoom) + "%"
  84. End Sub
  85.