Click here to Skip to main content
15,890,579 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi guys,

I am using Visual Studio 2013 to create a windows application.

Is it possible to retain the value of datetimepicker object to a local variable rather than using a database?

I also want to resize my form and scale all object on my form according the screen resolution of the PC.

Is that possible. please reply soon

best regards,

Bilal
Posted

1 solution

"Is it possible to retain the value of datetimepicker object to a local variable rather than using a database?"
Yes - you can store it in a DateTime and serialize it any way you want, within reason - you don;t have to use a DB:
VB
Dim myDate As DateTime  = myDateTimePicker.Value


"I also want to resize my form and scale all object on my form according the screen resolution of the PC.

Is that possible."

Yes, but...generally I would say "don't - it doesn't work well" The problem is that it's pretty simple to enlarge or shrink all your control proportionally to the size of the form, but that doesn't affect the content of the control, just it's external dimensions. So you end up with a large button, with tiny text in the middle, or a tiny button with text that doesn't fit. Getting round that in software is a real PITA - it is not a trivial proposition as all! So, unless your app is organised like VS with a central working area and "dockable" controls round the edges, I would design it for a specific size, and leave it at that.
The alternative is to change to WPF, which handles it gracefully, but...that's one heck of a learning curve!
 
Share this answer
 

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