Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - Calendar and VBScript
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Calendar and VBScript

 Post Reply Post Reply
Author
Message
DaveBonas View Drop Down
Newbie
Newbie


Joined: 06 February 2006
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote DaveBonas Quote  Post ReplyReply Direct Link To This Post Topic: Calendar and VBScript
    Posted: 29 March 2006 at 1:57am

Hi All,

I am trying to get the calendar control working on a web page and have managed to get the basic object up and running with no problems using VB Script, but am now struggling to get things such as disabling edit events and detecting when user has clicked on an entry in the calendar and returning the data such as start time of the entry.

Does anyone have a example of the calendar running using vb script which covers these kind of things that they could post, sorry for the generalisation of the question but am a noob to Vb/Script and am learing as I go.

Cheers,

Dave.

 

 

 

Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 29 March 2006 at 7:48am
Hi Dave,

With VB Script it works in a little bit another way. There are 2 following solutions:

1. Old one (for versions 9.81 and earlier):
-----------------------------------
Sub ccJobs_IsEditOperationDisabled(byval OpParams , CancelOperation)
 OpParams.DisableCancelOperation = True // NOTE: DisableCancelOperation is hidden member.
End Sub 
 
2. new one - version 10.x
-----------------------------------
Sub ccJobs_IsEditOperationDisabledV(byval OpParams , CancelOperation)
 CancelOperation = True
End Sub
 
-----------------------------------
Both of them do the same job - just have different styles. 

--
WBR,
Serge
Back to Top
DaveBonas View Drop Down
Newbie
Newbie


Joined: 06 February 2006
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote DaveBonas Quote  Post ReplyReply Direct Link To This Post Posted: 29 March 2006 at 7:55am

Thanks Serge,

I have managed to disable the edit operation but am still struggling to replicate the HitTest process from the VB example in order to check what the user clicked on, any ideas on this one.

Dave.

Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 29 March 2006 at 10:50am
This works in my test:
 
Sub ccJobs_DblClick()
    Dim HitTest
    Set HitTest = Document.forms(0).ccJobs.ActiveView.HitTest
   
    'xtpCalendarHitTestEvent_Mask = 4080
    If Not HitTest.HitCode and 4080 Then
        MsgBox "Event start = " & HitTest.ViewEvent.Event.StartTime
    End If
End Sub
 

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.173 seconds.