martin2k

ForumsVB6GamesSoftwareDirectoryHTMLArticlesBlogContact

Folder Dialog/Browser by Sena


 

Home

Read and add posts to the Visual Basic 6.0 Forums

Download some of my programs and OCXs

Read the Tips here

The old style forum is still available here

Contact


 

ActiveX Control

Check this out guys! This is a very nice ActiveX. You can easily browse your folders in your computer. It's better than the default Drive, Dir and File List Box. Well, the download link is here:
fdiag.ocx
Now, let's learn how to use it

  1. Download the file
  2. Load the file by clicking on the Project > Components then click on the "Browse" button
  3. Open the "fdiag.ocx" file
  4. Give a check on the small box next to the "Folder Dialog by Sena" text
  5. Press OK
  6. Now, click on the Folder Dialog Component on the Toolbox
  7. Leave the name "fdiag1"
  8. Create a textbox. Keep the name "Text1"
  9. Create a Command button too. And keep the name "Command1"!
  10. Enter these code on the Form
Text1.Text = fdiag1.BrowseForFolder(Form1.hWnd, "Choose a folder...")

11. Now, test out your program!
12. Click on the Command1 and choose a folder
13. On the Textbox, you should see the path of the folder that you've choosed!

That's so easy! You can make many programs with this ActiveX. Whatever it is, the code is just like this:

fdiag1.BrowseForFolder #FormhWnd#, #Prompted Message#

For the FormhWnd, just enter:

#form#.hWnd

Change the #form# into the name of the form that you put on the ActiveX! For example, you put the ActiveX on the frmAbout, so the code will be like this:

fdiag1.BrowseForFolder frmAbout.hWnd, "##Enter a message here##"

That's all! Thanks for reading!

----------------------------------------
Created by Sena
sena@mailbysena.co.cc
www.execenter.co.cc


blog comments powered by Disqus
Martin Allen 1999 - 2011.  Last updated Friday 12 August 2011 11:59:50 PM +0100.