VB.NET

Moderators: seancampbell
Number of threads: 3879
Number of posts: 9845

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
a calendar question? Posted by midgetchris on 28 Nov 2009 at 2:09 AM
If I use MonthCalendar in a program that I am working on for personal/medical use, is there a way to program that if the user click a date a new form will appear filling in the date automatically and closes the form with the MonthCalendar? And then when you finish entering the data you want to enter, save the data to file, close the 2nd form and return to the 1st form?
Report
Re: a calendar question? Posted by seancampbell on 1 Dec 2009 at 9:00 AM
Yes you should be able to program that functionality.

There are multiple ways to solve this, here is how I would do it:
Create 2 global variables called:
Dim MonthCalForm as Form1
Dim DayInformation as Form2

When I open the Month Calander form, I will set MonthCalForm = new Form1 and call MonthCalForm.Show()

When I select a date (there is probably a DateSelected handler), (I would make a Sub New for Form2 with Date as a parameter to streamline the form configuring itself)

DayInformation = New Form2(Date)
DayInformation.Show()
MonthCalForm.Hide()
DayInfromation.Focus()

When I click Save or Exit the DayInformation form, I would call MonthCalForm.Show() and possibly a public update function to grab updated information MonthCalForm.Update()

That is how I would do it, of course I am just some punk kid
Sean C



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.