View Single Post
Old Feb 18th, 2005, 2:56 PM   #1
chepfaust
Programmer
 
chepfaust's Avatar
 
Join Date: Feb 2005
Posts: 62
Rep Power: 4 chepfaust is on a distinguished road
"open" dialog boxes

hello,

in a program i'm trying to write, i've got a certain part where the user clicks on a button that says "load list" and the program reads from an external text file in a hardcoded location and fills in a listbox based on the contents of that text file.

i've got the reading/writing the external text file part down, but i would like to be able to allow the user to specify what text file they would like to open in the first place by clicking on "load list" as if it were a "browse for file" button.

i know this is a very, very noob question concerning visual basic but most of my programming background comes from qbasic many years ago, and i never had to deal with forms, APIs or all that much graphical interaction back then

i did find one site that provided code that explained how to do it, but it didn't work for me (i'm using VB6, i think it was geared towards .NET) and it was too complex for me to understand how to fix it. so if someone can summarize the basics of what i need to summon an "open" dialog box, i'd appreciate it.

thanks

edit: while i'm at it,

once the user has found the file they want to load and loaded it, i've got another button labeled "edit list" for which i want to open the actual text file they specify in notepad. for the life of me i can't figure out how to actually open an external file. i've tried the shell and appactivate commands but neither seemed to work.

Last edited by chepfaust; Feb 18th, 2005 at 3:01 PM.
chepfaust is offline   Reply With Quote