home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Programmer'…arterly (Limited Edition) / Visual_Basic_Programmers_Journal_VB-CD_Quarterly_Limited_Edition_1995.iso / code / ch24code / frmcreat.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-09-10  |  2.6 KB  |  93 lines

  1. VERSION 4.00
  2. Begin VB.Form frmCreateDirectory 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "Create Directory"
  5.    ClientHeight    =   2580
  6.    ClientLeft      =   1095
  7.    ClientTop       =   1515
  8.    ClientWidth     =   5445
  9.    BeginProperty Font 
  10.       name            =   "MS Sans Serif"
  11.       charset         =   0
  12.       weight          =   400
  13.       size            =   8.25
  14.       underline       =   0   'False
  15.       italic          =   0   'False
  16.       strikethrough   =   0   'False
  17.    EndProperty
  18.    Height          =   2985
  19.    Left            =   1035
  20.    LinkTopic       =   "Form1"
  21.    ScaleHeight     =   2580
  22.    ScaleWidth      =   5445
  23.    Top             =   1170
  24.    Width           =   5565
  25.    Begin VB.CommandButton cmdCancel 
  26.       Cancel          =   -1  'True
  27.       Caption         =   "Cancel"
  28.       Height          =   615
  29.       Left            =   3600
  30.       TabIndex        =   4
  31.       Top             =   960
  32.       Width           =   1575
  33.    End
  34.    Begin VB.CommandButton cmdCreate 
  35.       Caption         =   "&Create"
  36.       Default         =   -1  'True
  37.       Height          =   615
  38.       Left            =   3600
  39.       TabIndex        =   3
  40.       Top             =   240
  41.       Width           =   1575
  42.    End
  43.    Begin VB.DirListBox dirCurrent 
  44.       Height          =   1380
  45.       Left            =   120
  46.       TabIndex        =   2
  47.       Top             =   960
  48.       Width           =   3375
  49.    End
  50.    Begin VB.DriveListBox drvCurrent 
  51.       Height          =   315
  52.       Left            =   120
  53.       TabIndex        =   1
  54.       Top             =   600
  55.       Width           =   3375
  56.    End
  57.    Begin VB.TextBox txtDirectory 
  58.       Height          =   285
  59.       Left            =   120
  60.       TabIndex        =   0
  61.       Top             =   240
  62.       Width           =   3375
  63.    End
  64. Attribute VB_Name = "frmCreateDirectory"
  65. Attribute VB_Creatable = False
  66. Attribute VB_Exposed = False
  67. Private Sub cmdCancel_Click()
  68.     Unload frmCreateDirectory
  69. End Sub
  70. Private Sub cmdCreate_Click()
  71.     On Error GoTo cmdCreateErr
  72.     MkDir txtDirectory.Text
  73.     dirCurrent.Refresh
  74.     ChDir dirCurrent.Path
  75.     Unload frmCreateDirectory
  76.     Exit Sub
  77. cmdCreateErr:
  78.     Err = 0
  79.     Beep
  80.     MsgBox "Could not create directory " & txtDirectory.Text
  81. End Sub
  82. Private Sub dirCurrent_Change()
  83.     ChDir (dirCurrent.Path)
  84.     txtDirectory = dirCurrent.Path
  85. End Sub
  86. Private Sub drvCurrent_Change()
  87.     dirCurrent = drvCurrent.Drive
  88.     ChDrive (drvCurrent.Drive)
  89. End Sub
  90. Private Sub Form_Load()
  91.     txtDirectory.Text = CurDir
  92. End Sub
  93.