Capturing contents of launching file

Please support our C# advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
Reply

Join Date: Dec 2008
Posts: 1
Reputation: chortlehoort is an unknown quantity at this point 
Solved Threads: 0
chortlehoort chortlehoort is offline Offline
Newbie Poster

Capturing contents of launching file

 
0
  #1
Dec 1st, 2008
I've configured my Windows system to launch my application when someone opens a file with a specific extension (example: launchMyApp.xyz). Much like double-clicking on document.txt will open Notepad.

launchMyApp.xyz contains a series of strings that I want to use in my application. What I can't figure out how to do is capture the contents of launchMyApp.xyz.

How can I determine the contents of the file used to launch my application?
Last edited by chortlehoort; Dec 1st, 2008 at 2:39 pm.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 1,839
Reputation: ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of ddanbe has much to be proud of 
Solved Threads: 266
ddanbe's Avatar
ddanbe ddanbe is offline Offline
Posting Virtuoso

Re: Capturing contents of launching file

 
0
  #2
Dec 1st, 2008
If your application is a Windows Forms Application, you could use the Load eventhandler and do whatever you want to do in it.
Today is a gift, that's why it is called "The Present".
Make love, no war. Cave ab homine unius libri.
Danny
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,735
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 186
LizR LizR is offline Offline
Posting Virtuoso

Re: Capturing contents of launching file

 
0
  #3
Dec 1st, 2008
Personally I hate the idea of using the load event.

Anything that runs in the load event which causes a block can leave the poor soul wondering if they ever launched it.

What is a good idea is a timer, pass the timer the work and have the form load - all work of any potential delay should go in timers anyway, its a good practice to get into, so wether its retieve some file from the internet, or open a crappy text file of 1k on your HD...

What if that file suddenly was 20gb? Would you have your user on their 33.6k modem wait the week before your app launched?
Did I just hear "You gotta help us, Doc. We've tried nothin' and we're all out of ideas" ? Is this you? Dont let this be you! I will put in as much effort as you seem to.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the C# Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC