Print Page | Close Window

Popup Calendar

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=6072
Printed Date: 23 November 2024 at 12:01am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Popup Calendar
Posted By: jcollier
Subject: Popup Calendar
Date Posted: 10 January 2007 at 4:06pm
Since upgrading to 10.4 my popup calendar doesn't work.  I am using the following licence:

XtremeCalendarControl.License = "Calendar Control Copyright (c) 2003-2006 Codejock Software" & vbCrLf & "PRODUCT-ID: Codejock.Calendar.ActiveX.v10.4.0" & vbCrLf & "VALIDATE-CODE: XXX-XXX-XXX-XXX"

In 10.3.x the line worked except, of course, I had 10.3 in the line instead of 10.4.0.

Any ideas what could be wrong?



Replies:
Posted By: sserge
Date Posted: 10 January 2007 at 5:09pm
String "10.4.0" is not correct. Simply remove the last zero with dot, and it should work.

--
Regards,
Serge


Posted By: jcollier
Date Posted: 10 January 2007 at 5:15pm
You're right, it should.  But it doesn't.  I also tried changing the copyright year to 2007 but that didn't help either.


Posted By: elmsoftware
Date Posted: 11 January 2007 at 2:49pm
Do you need to use...CalendarGlobalSettings.License?
 
CalendarGlobalSettings.License = [Your license string]


Posted By: sserge
Date Posted: 12 January 2007 at 8:12am
The following code works pretty fine for me:


Private Sub Form_Initialize()
    Dim GS As New CalendarGlobalSettings
    GS.License = "Calendar Control Copyright (c) 2003-2006 Codejock
Software" + vbCrLf + _
                 "PRODUCT-ID: Codejock.Calendar.ActiveX.v10.4" + vbCrLf + _
                 "VALIDATE-CODE: XXX-XXX-XXX-XXX"

    
End Sub


--
WBR,
Serge


Posted By: jcollier
Date Posted: 12 January 2007 at 3:42pm
Ok the following code still generates the error on the Set pDatePicker line

Dim pDatePicker
   
    Dim GS As New CalendarGlobalSettings
    GS.License = "Calendar Control Copyright (c) 2003-2006 Codejock Software" + vbCrLf + "PRODUCT-ID: Codejock.Calendar.ActiveX.v10.4" + vbCrLf + "VALIDATE-CODE: XXX-XXX-XXX-XXX"
                
    Set pDatePicker = CreateObject("Codejock.DatePicker." + GS.Version)


Posted By: sserge
Date Posted: 13 January 2007 at 2:49pm
Hi,

The problem is that GS.Version returns string like "10.4.0".
We have to remove the last '.0'
 

CreateObject("Codejock.DatePicker." & XTPVersionTrim(GS.Version))
 
Private Function XTPVersionTrim(strVersionFull As String) As String
    Dim i As Long, j As Long
    Dim strVer As String
   
    Dim arVersion
    arVersion = Split(strVersionFull, ".")
 
    For i = UBound(arVersion) To LBound(arVersion) Step -1
        If arVersion(i) <> 0 Then
           
            For j = LBound(arVersion) To i
                If Len(strVer) > 0 Then
                    strVer = strVer + "."
                End If
                strVer = strVer + arVersion(j)
            Next
           
            XTPVersionTrim = strVer
            Exit Function
        End If
    Next
End Function


Actually, looks like this is a bit inconsistent and we'll review behavior of this method for future versions.

--
WBR,
Serge


Posted By: jcollier
Date Posted: 15 January 2007 at 10:04am
Great!  Now I know the problem.

This works too without having to write a new function:

Set pDatePicker = CreateObject("Codejock.DatePicker." + Replace(GS.Version, "10.4.0", "10.4"))

Thanks for the help.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net