Click here to Skip to main content
15,878,543 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello, I am developing a windows forms application, in visual studio, in C #.

The user will insert data in the texbox, listboxs, radionbuttun and applications will make the due calculations that will generate data that they would like to save too !! the way the user uses the freedom to make several separate projects and can access each one when necessary, so I would like to choose the place or the place where to save and return to the project he was not the place where he was saved and made two clicks on the project and my application opens or requires a project with all its specific data.

I can provide more information and explain better if, if there is any doubt in my goal, I'm sorry I don't know correctly, but I'm still learning, since already thank you all very much.

What I have tried:

I tried to make a database for each project, being created as the user made a new project, was using SQL serve CE (.sdf), however when I ran the application on another computer to test the database the program crashed ...
Updated 15-Apr-20 6:44am

If you're going to save data on the user's disk, you can use the .net Settings item template, which stores everything in the app.config file, and already has save/load functionality built into it. That's the absolute easiest way to go about storing user data.

Using the Settings template is well covered - Google is your friend. Here's a link to search results:

Google search for "app.config save and load" [^]
Share this answer
This is essentially the question that we discussed yesterday. Saving all the user's information in a single database is probably the best option.

And if your program crashed then you need to find out why.
Share this answer
João Henrique Braga 15-Apr-20 9:32am    
but still, I can't get the application to open a database by clicking on it twice, I don't know how I could do that.

Example: imagine that my application was a text editor (that works with the .txt file extension) I would like to click on a file called "teste.txt" and my editor would open the content in that file directly, instead of needing to open it my application and having to open "teste.txt" through an "opendialog"
Richard MacCutchan 15-Apr-20 10:48am    
Well again, I explained all this yesterday. You must register your application against the file extension that is your default.
João Henrique Braga 15-Apr-20 10:51am    
ok, even if my application has this extension association, how would reading this file be done? (my application interprets the data contained therein, in its initialization through a file with extension)
Richard MacCutchan 15-Apr-20 11:01am    
When the user clicks the file, the system starts the appropriate application, and passes the file name(s) in the argument array when it calls your main method.
João Henrique Braga 15-Apr-20 11:14am    
I understand, it makes a lot of sense. How could I get this file name parameter that is in the argument matrix? inside my application?

because until now I learned to "interact" in the application basically with what the user does, but only when it is already open. I don't know how I could do it to get the parameter of location and name of the file that "called" on startup

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900