Click here to Skip to main content
15,885,244 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to create a customizable database, able to add new forms and its controls according to need of the user, I want to add gridviews textboxes buttons all at the runtime
I want to know only two thing how to add new from on runtime and how to save it for next time oppening? Please help.
I use C# windows form and also Telerik winforms.

What I have tried:

I can add gridviews textboxes and even can use math with them but
I can't save it and I can't add new winform.
Posted
Updated 2-Jun-21 20:49pm
Comments
Richard MacCutchan 28-May-21 4:29am    
Creating a Winform is just a matter of creating a new class, adding controls to it, and calling the different methods to display it on the screen. You could have a skeleton form in your project that just needs to have controls added at runtime.

Saving the layout and/or content of a form (or any other data) can be done in a number of different ways: serialization, configuration settings, database etc. But first you need to decide what you need to save and where to save it according to your requirements.
NaseerAhmad007 2-Jun-21 16:36pm    
Thank you I am going test database for saving forms info. That is a good idea and easier i think.
BillWoodruff 28-May-21 4:36am    
"according to need of the user" user is someone launching your app, or, user is a programmer able to see, change, compile, run, your code ?

if you can add GridViews, why is adding a WinForm a problem ?
NaseerAhmad007 2-Jun-21 4:21am    
Ok this is the full idea!
For example you need to make an app for a big store you will get 1000$ if you complete it in one month working hard,
I want to ask you this " What about a way to complete it in one day? " I am working on something like that. I hope you understand.
BillWoodruff 2-Jun-21 6:27am    
Please respond to the specific questions I asked you.

You might want to re-evaluate your design if you mean creating a form on the fly at runtime and saving it. What you want to do instead is create a generic form on design time and populate it accordingly during run-time. I'm sure with the latter approach you don't have any issue.
 
Share this answer
 
Comments
NaseerAhmad007 28-May-21 0:16am    
I just want to create an application able to create a database in an hour at most without any coding
For example a book store's database is completely deferment from a hospital database need deferent amount of forms
I just want to make a complete new way of making a database but stuck at first step.
BillWoodruff 28-May-21 4:25am    
What you describe is impractical, and very confused.
NaseerAhmad007 1-Jun-21 14:53pm    
impractical? You mean impossible? I think programming has no limits.
If you mean you don't understand sorry for my bad english.
BillWoodruff 2-Jun-21 6:25am    
By "impractical: I mean so possibly large in scope ... the potential things that could be done ... that it would require years of development.

No problem with your English, just trying to get a more concrete exajoule of what your goal is.
You mean something like the code below? This snippet assumes that you already created a PatientForm.cs or .vb, a form class in Visual Studio.

C#
PatientForm form = new PatientForm();
form.ShowDialog(this);
 
Share this answer
 
Comments
NaseerAhmad007 1-Jun-21 14:40pm    
A default form will do but the problem is something else i will add deferent things like texboxes gridviews lables and so one more importanly link to database I want to save all this information for next time use, is here anyway?.
Giovanni Bejarasco 2-Jun-21 1:42am    
Yes but just too impractical.You can do what Richard MacCutchan above suggested. Remember that UI is very subjective. You cannot create a single UI you think will cater for everyone. Good luck!
Salaam Naseer, When I say that your developing a generic low/no-code app that generates customized solutions for many types of specific uses is a fantasy, and, a way to waste your time ... that is not meant as an insult !

You can design an app for perhaps one type of vertical market, say a restaurant table/seating service, and save that as a template in Visual Studio, but, you will still have to do intensive customization for a specific client,

Even within a very narrow category, like a restaurant table/seating service, there could be endless variations in the UI the client requires.

Putting in the effort to fully implement a solution for a specific vertical market that you design based on a spec you make based on your observation of a real-world business ... that will make you a better programmer, and you will have something to show that might help you get work, as well as giving you a head-start on implementing other solutions.
 
Share this answer
 
Comments
NaseerAhmad007 5-Jun-21 2:53am    
Thank you I'll keep in mind what you said.
BillWoodruff 6-Jun-21 22:32pm    
check out: https://thenextweb.com/news/developer-side-projects-career-syndication

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