Any visual basic 6 help?

danagol

Baseband Member
Messages
67
Hi i have just got visual basic 6, and have created some simple things. however i want to know how i can make it so that when i click a button a file will open on my computer. not throught visual basic, just as if i were to mauallt open the file with the double click. any help is good many thanks dan
 
you mean open the executable or .exe file? if you want to do that, go into the bin folder udner where your project is saved and then it should come up. for example: say your project is named "test" then you would go to the "test" folder wherever it's saved at and go to "test" in there and when you click it should say either "application" or "executable file" or something along those lines. Works for me so hopefully it will work for you.

Good luck!
 
What i want it to open is a text [.txt] file. ive searched and searched on google but all i can find is how to load it into an existing text box on the form. i just want it so when i hit the about button. the .txt file itself will open as if it were to be opened by you. however thanks for the above help, ill give that a go on some things and experiment with it :)
 
If your button is button1, then it would be like:

button1.click = shell("C:\windows\system32\calc.exe")

You can replace anything within the parentheses with the full path to a file. Hope this helps =)
 
Back
Top Bottom