home *** CD-ROM | disk | FTP | other *** search
/ Master 95 #1 / MASTER95_1.iso / microsof / vbasic4 / vb4-6.cab / zoom.frm (.txt) < prev   
Encoding:
Visual Basic Form  |  1995-07-26  |  3.0 KB  |  109 lines

  1. VERSION 4.00
  2. Begin VB.Form frmZoom 
  3.    ClientHeight    =   1800
  4.    ClientLeft      =   3600
  5.    ClientTop       =   3930
  6.    ClientWidth     =   4560
  7.    Height          =   2205
  8.    HelpContextID   =   2016148
  9.    Icon            =   "ZOOM.frx":0000
  10.    KeyPreview      =   -1  'True
  11.    Left            =   3540
  12.    LinkTopic       =   "Form1"
  13.    LockControls    =   -1  'True
  14.    ScaleHeight     =   1800
  15.    ScaleWidth      =   4560
  16.    Top             =   3585
  17.    Width           =   4680
  18.    Begin VB.CommandButton cmdClose 
  19.       Caption         =   "&Close"
  20.       Height          =   264
  21.       Left            =   120
  22.       TabIndex        =   4
  23.       Top             =   36
  24.       Visible         =   0   'False
  25.       Width           =   972
  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         =   "&Save Changes"
  36.       Height          =   264
  37.       Left            =   120
  38.       TabIndex        =   2
  39.       Top             =   36
  40.       Visible         =   0   'False
  41.       Width           =   1932
  42.    End
  43.    Begin VB.CommandButton cmdCloseNoSave 
  44.       Cancel          =   -1  'True
  45.       Caption         =   "&Close w/o Changes"
  46.       Height          =   264
  47.       Left            =   2160
  48.       TabIndex        =   3
  49.       Top             =   40
  50.       Visible         =   0   'False
  51.       Width           =   1932
  52.    End
  53.    Begin VB.TextBox txtMemo 
  54.       BackColor       =   &H00FFFFFF&
  55.       Height          =   1332
  56.       Left            =   48
  57.       MultiLine       =   -1  'True
  58.       ScrollBars      =   2  'Vertical
  59.       TabIndex        =   1
  60.       Top             =   360
  61.       Visible         =   0   'False
  62.       Width           =   4452
  63.    End
  64. Attribute VB_Name = "frmZoom"
  65. Attribute VB_Creatable = False
  66. Attribute VB_Exposed = False
  67. Option Explicit
  68. Private Sub txtZoomData_KeyPress(KeyAscii As Integer)
  69.   'throw away the key if save not allowed
  70.   If cmdSave.Visible = False Then KeyAscii = 0
  71. End Sub
  72. Private Sub cmdCloseNoSave_Click()
  73.   gsZoomData = "__CANCELLED__"
  74.   Unload Me
  75. End Sub
  76. Private Sub cmdClose_Click()
  77.   Call cmdCloseNoSave_Click
  78.   Unload Me
  79. End Sub
  80. Private Sub Form_KeyPress(KeyAscii As Integer)
  81.   'check for the escape key
  82.   If KeyAscii = 27 Then
  83.     Call cmdCloseNoSave_Click
  84.     Exit Sub
  85.   End If
  86. End Sub
  87. Private Sub Form_Load()
  88.   Me.Width = 4600
  89.   CenterMe Me, gnMDIFORM
  90.   SendKeys "{End}"
  91. End Sub
  92. Private Sub Form_Resize()
  93.   On Error Resume Next
  94.   If txtZoomData.Visible = True Then
  95.     txtZoomData.Width = Me.Width - 200
  96.   Else
  97.     txtMemo.Width = Me.Width - 200
  98.     txtMemo.Height = Me.Height - 850
  99.   End If
  100. End Sub
  101. Private Sub cmdSave_Click()
  102.   If txtZoomData.Visible = True Then
  103.     gsZoomData = txtZoomData.Text
  104.   Else
  105.     gsZoomData = txtMemo.Text
  106.   End If
  107.   Unload Me
  108. End Sub
  109.