Re: File associations and file loading at startup
- From: "Dan Ritchie" <DanRitchie@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 8 Jun 2005 16:31:07 -0700
Ah, I put a like like
Msgbox (curdir)
at the beginning of my program
It seems that the current directory is set to the folder where the file
exists,
and not where the program is installed.
The plot thickens.
Is there any way to defeat or work around this behaviour, so that my current
directory is the folder where the program is installed?
> Well, I thought it would be so easy.
> I associated my file with my VB program, using Windows's open with... thing.
> when it runs my program, I get the message "The specified path/fine name
> cannot be accessed or is invalid."
> It does this weather I include the code to handle the command line or not.
> Odd.
> It does work if I drop the file onto the programs icon. It s starts the
> program up normally.
> But not when I run the associated file.
>
>
> > "Dan Ritchie" <DanRitchie@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> > news:15A9F266-4B68-4273-95EB-9338ACB92605@xxxxxxxxxxxxxxxx
> > >I need to implement the ability to load a file that is associated with my
> > > application, when clicked on.
> > > I don't really know the word for this cabability under Windows, if
> > > somebody
> > > could help me out?
> > > Anyway, if a file is associated with my application, and somebody
> > > double-clicks on it, it should run my application, and then the file
> > > should
> > > be loaded up. I assume I need to get the name of the file and arguments
> > > somehow at startup.
> >
> > If an association is setup, Command$ will contain the name of the file.
> >
> > To setup an association, grab this class....
> >
> > Complete Registry control
> > http://www.vbaccelerator.com/home/VB/Code/Libraries/Registry_and_Ini_Files/Complete_Registry_Control/article.asp
> >
> > On that page, there's a section that starts.....
> >
> > To Associate a File of type .CCD with your executable
> >
> > ....read that to see how easy it is. Only a couple of lines of code required.
> >
> > --
> > Ken Halter - MS-MVP-VB - http://www.vbsight.com
> > DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
> > Please keep all discussions in the groups..
> >
> >
> >
.
- Follow-Ups:
- Re: File associations and file loading at startup
- From: Ken Halter
- Re: File associations and file loading at startup
- From: Bob Butler
- Re: File associations and file loading at startup
- References:
- File associations and file loading at startup
- From: Dan Ritchie
- Re: File associations and file loading at startup
- From: Ken Halter
- Re: File associations and file loading at startup
- From: Dan Ritchie
- File associations and file loading at startup
- Prev by Date: Re: File associations and file loading at startup
- Next by Date: Re: Fastest way to read characters
- Previous by thread: Re: File associations and file loading at startup
- Next by thread: Re: File associations and file loading at startup
- Index(es):
Relevant Pages
|