|
-
Apr 22nd, 2007, 08:25 PM
#1
Thread Starter
Member
[RESOLVED] Does anyone here know how to...
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...
Last edited by fantasy2ville; Apr 22nd, 2007 at 08:29 PM.
Reason: to emphasize the point
-
Apr 22nd, 2007, 08:38 PM
#2
Re: Does anyone here know how to...
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))
-
Apr 25th, 2007, 07:37 PM
#3
Thread Starter
Member
Re: Does anyone here know how to...
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?
-
Apr 25th, 2007, 07:46 PM
#4
Hyperactive Member
Re: Does anyone here know how to...
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...
-
Apr 25th, 2007, 07:53 PM
#5
Thread Starter
Member
Re: Does anyone here know how to...
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
-
Apr 25th, 2007, 07:59 PM
#6
Re: Does anyone here know how to...
 Originally Posted by fantasy2ville
does that mean that the applications im developing in vb.net would only run in a pc with a .Net framework?
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|