home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / PVb5.0 / VB / SAMPLES / VISDATA / ZOOM.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-01-12  |  3.3 KB  |  124 lines

  1. VERSION 5.00
  2. Begin VB.Form frmZoom 
  3.    ClientHeight    =   1800
  4.    ClientLeft      =   3600
  5.    ClientTop       =   3930
  6.    ClientWidth     =   4575
  7.    HelpContextID   =   2016148
  8.    Icon            =   "ZOOM.frx":0000
  9.    KeyPreview      =   -1  'True
  10.    LinkTopic       =   "Form1"
  11.    LockControls    =   -1  'True
  12.    ScaleHeight     =   1800
  13.    ScaleWidth      =   4575
  14.    ShowInTaskbar   =   0   'False
  15.    StartUpPosition =   1  'CenterOwner
  16.    Begin VB.CommandButton cmdClose 
  17.       Caption         =   "
  18. (&C)"
  19.       Height          =   264
  20.       Left            =   75
  21.       MaskColor       =   &H00000000&
  22.       TabIndex        =   4
  23.       Top             =   30
  24.       Visible         =   0   'False
  25.       Width           =   1400
  26.    End
  27.    Begin VB.TextBox txtZoomData 
  28.       Height          =   285
  29.       Left            =   40
  30.       TabIndex        =   0
  31.       Top             =   360
  32.       Width           =   4455
  33.    End
  34.    Begin VB.CommandButton cmdSave 
  35.       Caption         =   "
  36. (&S)"
  37.       Height          =   264
  38.       Left            =   1575
  39.       MaskColor       =   &H00000000&
  40.       TabIndex        =   2
  41.       Top             =   30
  42.       Visible         =   0   'False
  43.       Width           =   1400
  44.    End
  45.    Begin VB.CommandButton cmdCloseNoSave 
  46.       Cancel          =   -1  'True
  47.       Caption         =   "
  48. (&C)"
  49.       Height          =   264
  50.       Left            =   3090
  51.       MaskColor       =   &H00000000&
  52.       TabIndex        =   3
  53.       Top             =   30
  54.       Visible         =   0   'False
  55.       Width           =   1400
  56.    End
  57.    Begin VB.TextBox txtMemo 
  58.       BackColor       =   &H00FFFFFF&
  59.       Height          =   1332
  60.       Left            =   48
  61.       MultiLine       =   -1  'True
  62.       ScrollBars      =   2  'Vertical
  63.       TabIndex        =   1
  64.       Top             =   360
  65.       Visible         =   0   'False
  66.       Width           =   4452
  67.    End
  68. Attribute VB_Name = "frmZoom"
  69. Attribute VB_GlobalNameSpace = False
  70. Attribute VB_Creatable = False
  71. Attribute VB_PredeclaredId = True
  72. Attribute VB_Exposed = False
  73. Option Explicit
  74. '>>>>>>>>>>>>>>>>>>>>>>>>
  75. Const BUTTON1 = "
  76. (&C)"
  77. Const BUTTON2 = "
  78. (&S)"
  79. Const BUTTON3 = "
  80. (&C)"
  81. '>>>>>>>>>>>>>>>>>>>>>>>>
  82. Private Sub txtZoomData_KeyPress(KeyAscii As Integer)
  83.   If cmdSave.Visible = False Then KeyAscii = 0
  84. End Sub
  85. Private Sub cmdCloseNoSave_Click()
  86.   gsZoomData = "__CANCELLED__"
  87.   Unload Me
  88. End Sub
  89. Private Sub cmdClose_Click()
  90.   Call cmdCloseNoSave_Click
  91.   Unload Me
  92. End Sub
  93. Private Sub Form_KeyPress(KeyAscii As Integer)
  94.  esc 
  95.   If KeyAscii = vbKeyEscape Then
  96.     Call cmdCloseNoSave_Click
  97.     Exit Sub
  98.   End If
  99. End Sub
  100. Private Sub Form_Load()
  101.   cmdClose.Caption = BUTTON1
  102.   cmdSave.Caption = BUTTON2
  103.   cmdCloseNoSave.Caption = BUTTON3
  104.   Me.Width = 4600
  105.   SendKeys "{End}"
  106. End Sub
  107. Private Sub Form_Resize()
  108.   On Error Resume Next
  109.   If txtZoomData.Visible Then
  110.     txtZoomData.Width = Me.Width - 200
  111.   Else
  112.     txtMemo.Width = Me.Width - 200
  113.     txtMemo.Height = Me.Height - 850
  114.   End If
  115. End Sub
  116. Private Sub cmdSave_Click()
  117.   If txtZoomData.Visible Then
  118.     gsZoomData = txtZoomData.Text
  119.   Else
  120.     gsZoomData = txtMemo.Text
  121.   End If
  122.   Unload Me
  123. End Sub
  124.