Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to define a default directory for app?

Status
Not open for further replies.

voidhawk

IS-IT--Management
Aug 13, 2000
4
0
0
US
I'm trying to have a compiled app populate a FileListBox with the contents of a particular directory upon execution.

When I test/run the code within VB, the desired directory correctly populates the FileListBox, but when executing the compiled code/executable the FileListBox is populated with the contents of c:\Program Files\Common Files\System\Mapi\1033\95.

This is probably a "no-brainer", but its late and I'm stumped...any suggestions or pointers in the right direction would be greatly appreciated.TIA
 
I'm not sure I understand. If you intend to populate the list with the files in the folder where the application resides you could try [tt]File1 = App.Path[/tt]. Otherwise you could direct the filelist explicitly with something like [tt]File1 = "C:\WINDOWS"[/tt].

The FileListBox control always defaults to the current directory, unless you tell it otherwise.
 
Thanks Alt...sometimes you just need to walk away from it (especially at 4AM!) I wasn't setting the FileListBox.Path to the desired directory during Form_Load(), I appreciate the response!

Yeah Lacey, the wonderful world of Peter F. Hamilton, can't wait to read the new novella, Watching Trees Grow. Due out sometime soon.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top