open a folder with a click of a button?... im trying to develop an autorun cd application using vb.net which includes a "browse this cd" button, im a beginner so i cant seem to figure out how to do it...
:afrog:
Printable View
open a folder with a click of a button?... im trying to develop an autorun cd application using vb.net which includes a "browse this cd" button, im a beginner so i cant seem to figure out how to do it...
:afrog:
That's not such a good idea because if the CD is intended to install your app then there's no guarantee that they'll have the .NET Framework installed when the insert the disc. If that's the case then your app will never run and the user will get a cryptic error message.
All that aside, you browse for folders using a FolderBrowserDialog and files using an OpenFileDialog. That wouldn't be appropriate in your case though. What you want is for a Windows Explorer window to open rooted at the optical drive. That would be:vb Code:
Process.Start(IO.Path.GetPathRoot(Application.StartupPath))
well, yeah... im really intending an explorer window to open so that the user can do the "explore the contents of the cd" thing
my autorun application doesnt really intend to install another application but it should only serve as a startup screen.... but i really didnt get what you said... does that mean that the applications im developing in vb.net would only run in a pc with a .Net framework?
well yes any application you make in VB.net will require the dot net framework, but there is a way around this.
when you burn this cd also burn the dotnet framework redistributable version.
Then before the dotnet app runs, run a script to check if the framwork is installed, if it is run your app, otherwise install the framework.
There are scripts on the net for this exact purpose, do a google for one...
So yeah run the script from auto run and run your app from the script, it will ony require one line of code to run your app, and one to install the framwork, so if you find the right script it will be easy...
well, that's such a hassel, making a startup form and require the user to install a .net framework would require alot of memory space... maybe i should try vb6.0 instead... thanks for the responses anyway... i could still use the code for future reference
Exactly. ALL .NET apps require the .NET Framework to be installed or they won't run. There are various good reasons for this that I won't go into here. There are numerous threads about this on the forum and plenty of information available on the Web.Quote:
Originally Posted by fantasy2ville