vbAccelerator - Contents of code file: frmTest.frm

VERSION 5.00
Begin VB.Form frmMain 
   Caption         =   "vbAccelerator Browse For Folder Tester"
   ClientHeight    =   3765
   ClientLeft      =   5850
   ClientTop       =   2835
   ClientWidth     =   6585
   BeginProperty Font 
      Name            =   "Tahoma"
      Size            =   8.25
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "frmTest.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   3765
   ScaleWidth      =   6585
   Begin VB.CommandButton cmdCustom 
      Caption         =   "&Customised Dialog"
      Height          =   495
      Left            =   180
      TabIndex        =   1
      Top             =   720
      Width           =   1155
   End
   Begin VB.CommandButton cmdStandard 
      Caption         =   "&Standard Dialog"
      Height          =   495
      Left            =   180
      TabIndex        =   0
      Top             =   120
      Width           =   1155
   End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Public WithEvents c As cBrowseForFolder
Attribute c.VB_VarHelpID = -1

Private Sub cmdCustom_Click()
   Me.Enabled = False
   Dim fC As New frmCapture
   Dim c As New cCaptureBF
   With c
      With .Browse
         .hwndOwner = Me.hwnd
         .InitialDir = App.Path
         .FileSystemOnly = True
         .Title = ""
      End With
      .Show fC
   End With
   If Not fC.Cancelled Then
      MsgBox "Choose folder: " & fC.SelectedFolder, vbInformation
   End If
   'Me.Enabled = True
   'Me.SetFocus
End Sub

Private Sub cmdStandard_Click()
Dim s As String

   c.hwndOwner = Me.hwnd
   c.InitialDir = App.Path
   c.FileSystemOnly = True
   c.StatusText = True
   c.EditBox = True
   c.UseNewUI = True
   s = c.BrowseForFolder
   If Len(s) > 0 Then
      MsgBox s, vbInformation
   End If

End Sub

Private Sub Form_Load()
   Set c = New cBrowseForFolder
End Sub