sertol Posted March 8, 2007 Report Share Posted March 8, 2007 Hello: I am able to read and wirte to a configuration file. My problem is that the operator has to select a configutation file everytime they run the program. I need to be able to have my program open the file without having the operator to select to open a file. Quote Link to comment
JDave Posted March 8, 2007 Report Share Posted March 8, 2007 QUOTE(sertol @ Mar 7 2007, 10:48 AM) Hello:I am able to read and wirte to a configuration file. My problem is that the operator has to select a configutation file everytime they run the program. I need to be able to have my program open the file without having the operator to select to open a file. It would be easiest to point out how to fix the problem if you posted the code or at least a picture of where you are having to select the configuration file in the code. The short answer is to wire in a path constant containing the path of the config file rather than leaving it unwired or using a file dialog. David Quote Link to comment
sertol Posted March 9, 2007 Author Report Share Posted March 9, 2007 here is a copy of my write to config file. Quote Link to comment
LV-Vikingr Posted March 9, 2007 Report Share Posted March 9, 2007 I would save the selected path to the Windows registry every time the user wants to choose a different selection. When the program loads, look in the registry for the path. Quote Link to comment
Mikkel Posted March 9, 2007 Report Share Posted March 9, 2007 Even better: Save it in a config file! -Mikkel Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.