UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Vb6 Popup Calendar, Any Version    
 
   
PC_User
post Feb 27 2012, 07:16 PM
Post #1

UtterAccess Veteran
Posts: 345
From: Los Angeles, California USA



Does anyone have a non-ActiveX popup calendar (aka Non-activex Datepicker Calendar Control) for VB6?

This post has been edited by PC_User: Feb 27 2012, 07:19 PM
Go to the top of the page
 
+
merlenicholson
post Feb 27 2012, 10:40 PM
Post #2

UtterAccess Veteran
Posts: 348
From: Tampa, Florida, USA - UTC -5:00



I sure do, one that I use in several contexts. All calendar functions are VBA driven. This version is a calendar subform in a main form, and it puts the date you select in the windows clipboard. I have several variations of this little Access 2003 app, but it's the first one I could get because I have a shortcut on my desktop - I use it all the time.

I hope you find it useful. It's easily adaptable to a variety of needs.

Attached File  Cal.zip ( 146.58K ) Number of downloads: 17
Go to the top of the page
 
+
PC_User
post Feb 28 2012, 09:25 AM
Post #3

UtterAccess Veteran
Posts: 345
From: Los Angeles, California USA



Thanks for your reply with attachment. Now how do I get this MS Access calendar to work in a VB6 project? I have other MS Access calendars and I haven't figured out how to get them into my VB6 project. Your help is appreciated.

QUOTE (PC_User @ Feb 27 2012, 04:16 PM) *
Does anyone have a non-ActiveX popup calendar (aka Non-activex Datepicker Calendar Control) for VB6?


This post has been edited by PC_User: Feb 28 2012, 09:28 AM
Go to the top of the page
 
+
merlenicholson
post Feb 28 2012, 11:37 AM
Post #4

UtterAccess Veteran
Posts: 348
From: Tampa, Florida, USA - UTC -5:00



Ok, it's not VB6, but it's VBA, and I thought you'd be happy to have all of my brilliant calendary calculations to use in your VB6 project. You can't use what I gave you in Access without recreating the form in VB6, but other than that, the code is directly applicable.

I should have this implemented as a VB6 component somewhere; I'll look further.
Go to the top of the page
 
+
merlenicholson
post Feb 29 2012, 12:53 PM
Post #5

UtterAccess Veteran
Posts: 348
From: Tampa, Florida, USA - UTC -5:00



Here's a VB6 version, not as a component, but capable of being cut and pasted into any VB6 app, provided there's no name conflict, or implemented as a pop-up form in your VB6 Project. I wrote this many years ago as a solution to all the conflicting calendar controls MS put out over the years. This one (and the Access version) has nothing in it that will prevent it from being migrated from one Access version or Windows OS to another. It uses "Short Date" as a date format, which is regional in nature, set in Windows settings.

I know you've been asking for one for the last month, and I'd be happy to answer any specific questions about this little app. Please let us know how this is going.
Thanks.

Attached File  Cal.zip ( 14.45K ) Number of downloads: 7
Go to the top of the page
 
+
PC_User
post Feb 29 2012, 01:46 PM
Post #6

UtterAccess Veteran
Posts: 345
From: Los Angeles, California USA



Excellent. Thanks very much. This is just what I'm looking for. I did find about a dozen others on Planet Source Code, but yours is the right one. In years past I learned MS Access; however, I think that I should have started out with VB. Recently I worked out most of the issues with an Access prototype as I am learning the simple basics of VB6. Attached is the prototype that I eventually want to complete in VB6. I know as others in the forum have said that I need to work with more recent versions of VB.NET, but please be patient with me as I learn VB6.

On my main form in my VB6 project, I have buttons to call for the popup calendar. As you can see in the attachment, I have done this in Access; but how do I do it in VB6? One thing that I noticed right away about VB6 is that it handles events differently.

This post has been edited by PC_User: Feb 29 2012, 01:49 PM
Attached File(s)
Attached File  QuoteDownloader.zip ( 171.94K ) Number of downloads: 17
 
Go to the top of the page
 
+
PC_User
post Mar 1 2012, 10:14 PM
Post #7

UtterAccess Veteran
Posts: 345
From: Los Angeles, California USA



Ok. So I found a way to call the popup calendar and now it pops up, but how do I capture the date into a textbox that is on the main form and how do I control the position of the popup calendar so it will popup next to the date textbox?

CODE
Private Sub cmdStartDate_Click()
   frmCal.Show vbModal
End Sub
Private Sub cmdEndDate_Click()
   frmCal.Show vbModal
End Sub


This post has been edited by PC_User: Mar 1 2012, 10:15 PM
Go to the top of the page
 
+
merlenicholson
post Mar 2 2012, 12:47 AM
Post #8

UtterAccess Veteran
Posts: 348
From: Tampa, Florida, USA - UTC -5:00



Ok, I've done this for you. Added a form with Start Date and End Date buttons, and it pops up the calendar form next to the button - to serve as an example.

You get the output date through the Cal Property Get - that was always there. It didn't work exactly as I expected. It would output a date when you navigated the month up or down, so I had to fix that, and then I added the means to pass a Top and Left screen positions to the popup. In all, I made very few changes to the Cal popup, and I've noted those changes in comments.

Attached File  Cal_Test.zip ( 17.1K ) Number of downloads: 14
Go to the top of the page
 
+
PC_User
post Mar 2 2012, 12:55 AM
Post #9

UtterAccess Veteran
Posts: 345
From: Los Angeles, California USA



Thanks very much. I also downloaded some other examples from the web. Using examples I found for Access helped me to learn Access and I'm sure that will work for VB6. Your help is appreciated.
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 18th June 2013 - 05:46 PM