home *** CD-ROM | disk | FTP | other *** search
/ BUG 6 / BUGCD1997_09.BIN / UTIL / ADDZIP / ADDZIP.EXE / VB / QUICKZIP / UTILITY.FRM (.txt) < prev   
Encoding:
Visual Basic Form  |  1997-06-01  |  2.6 KB  |  80 lines

  1. VERSION 2.00
  2. Begin Form frmUtility 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    ClientHeight    =   975
  6.    ClientLeft      =   2490
  7.    ClientTop       =   3615
  8.    ClientWidth     =   5175
  9.    Height          =   1380
  10.    Left            =   2430
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   975
  15.    ScaleWidth      =   5175
  16.    Top             =   3270
  17.    Width           =   5295
  18.    Begin CommandButton cmdCancel 
  19.       Cancel          =   -1  'True
  20.       Caption         =   "Cancel"
  21.       Height          =   375
  22.       Left            =   2520
  23.       TabIndex        =   1
  24.       Top             =   480
  25.       Width           =   1215
  26.    End
  27.    Begin CommandButton cmdOK 
  28.       Caption         =   "OK"
  29.       Default         =   -1  'True
  30.       Height          =   375
  31.       Left            =   3840
  32.       TabIndex        =   2
  33.       Top             =   480
  34.       Width           =   1215
  35.    End
  36.    Begin TextBox txtInput 
  37.       Height          =   285
  38.       Left            =   120
  39.       TabIndex        =   0
  40.       Text            =   "Text1"
  41.       Top             =   120
  42.       Width           =   4935
  43.    End
  44. Option Explicit
  45. Sub cmdCancel_Click ()
  46.   g_cTemp = ""
  47.   Unload Me
  48. End Sub
  49. Sub cmdOK_Click ()
  50.   Const ATTR_DIRECTORY = 16 ' Declare form constant.
  51.   g_cTemp = txtInput.Text
  52.   If ((InStr(frmUtility.Caption, "directory") > 0) And (Dir(g_cTemp, ATTR_DIRECTORY) = "")) Then
  53.     MsgBox g_cTemp & " is not a directory!", 16, "Error"
  54.     Exit Sub
  55.   End If
  56.   Unload Me
  57. End Sub
  58. Sub Draw3D (a As Control)
  59.     Me.Line (a.Left - 10, a.Top - 10)-Step(10, a.Height + 20), RGB(128, 128, 128), BF
  60.     Me.Line (a.Left - 10, a.Top - 10)-Step(a.Width + 20, 10), RGB(128, 128, 128), BF
  61.     Me.Line (a.Left + a.Width, a.Top - 10)-Step(10, a.Height + 20), RGB(255, 255, 255), BF
  62.     Me.Line (a.Left - 10, a.Top + a.Height)-Step(a.Width + 20, 10), RGB(255, 255, 255), BF
  63. End Sub
  64. Sub Form_Load ()
  65.   Dim I As Integer
  66.   Move screen.Width / 2 - Me.Width / 2, screen.Height / 2 - Me.Height / 2
  67.   If (frmQuickZIP.mnuOptionsOnTop.Checked = True) Then
  68.     I = SetWindowPos(Me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)
  69.   End If
  70.   Form_Colour Me
  71. End Sub
  72. Sub Form_Paint ()
  73.     Call Draw3D(txtInput)
  74. End Sub
  75. Sub txtInput_GotFocus ()
  76.     ' highlight text when control first gets focus
  77.     txtInput.SelStart = 0          ' Start selection at beginning.
  78.     txtInput.SelLength = Len(txtInput.Text)  ' Length of text in Text1.
  79. End Sub
  80.