Print Page | Close Window

Reminder

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=9541
Printed Date: 13 May 2024 at 10:45am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Reminder
Posted By: WillieVS
Subject: Reminder
Date Posted: 09 February 2008 at 2:12am
I cannot seem to find the XtremeCalendarControl.CalendarDialogsClass in the ocx.
How do I activate reminders using the ocx calender.
 
Thanks


-------------
Willie van Schalkwyk
http://www.cyberprop.com



Replies:
Posted By: WillieVS
Date Posted: 11 February 2008 at 6:34am
Ok, I have found the solution after trying about everything. Here is the solution should anybody else need it in future:
 
VB Code:
 

If mnuEnableReminders.Checked Then
    objCalendraDialogsReminders.Calendar = CalendarControl.GetOcx()
    'objCalendraDialogsReminders.ParentHWND = Me.Handle.ToInt32()
    objCalendraDialogsReminders.RemindersWindowShowInTaskBar = True
    objCalendraDialogsReminders.CreateRemindersWindow()
Else
    objCalendraDialogsReminders.CloseRemindersWindow()
End If
 
FoxPro Code:

IF this.Value = 1
    thisform.xtremecalendar.enableReminders(.t.)
    thisform.oreminder = CREATEOBJECT("CodeJock.CalendarDialogs.11.2.2")
    thisform.oreminder.Calendar = thisform.xtremecalendar.object
    thisform.oreminder.RemindersWindowShowInTaskBar = .t.
    thisform.oreminder.CreateRemindersWindow()
ELSE
    thisform.xtremecalendar.enableReminders(.f.)
   thisform.oreminder = CREATEOBJECT("CodeJock.CalendarDialogs.11.2.2")
    thisform.oreminder.CloseRemindersWindow()
ENDIF
 
The real problem here was to create the reminder object as there was no reference to the name to be used in the createobject function.
 
The problems comes with creating the


-------------
Willie van Schalkwyk
http://www.cyberprop.com


Posted By: wlcabral
Date Posted: 11 February 2008 at 7:54am

If you need to create some others objects :::

******** Foxpro CODE :
 
with this  && "this" is my class where I put everything from CodeJock together

   .cVersion = "11.2.2"

   .GlobalSettings_CommandBars = createobject("Codejock.CommandBarsGlobalSettings." + this.cVersion)
   .GlobalSettings_PropertyGrid = createobject("Codejock.PropertyGridGlobalSettings." + this.cVersion)
   .GlobalSettings_ReportControl = createobject("Codejock.ReportControlGlobalSettings." + this.cVersion)
   .GlobalSettings_SuiteControls = createobject("Codejock.SuiteControlsGlobalSettings." + this.cVersion)
   .GlobalSettings_ShortCutBar = createobject("Codejock.ShortCutBarGlobalSettings." + this.cVersion)
   .GlobalSettings_TaskPanel = createobject("Codejock.TaskPanelGlobalSettings." + this.cVersion)
   .GlobalSettings_Calendar = createobject("Codejock.CalendarGlobalSettings." + this.cVersion)

   .GlobalSettings_CalendarTheme = createobject("Codejock.CalendarThemeOffice2007." + this.cVersion)
   .GlobalSettings_DatePickerTheme = createobject("Codejock.DatePickerThemeOffice2007." + this.cVersion)

   ._setSystemTheme()

endwith


procedure _setSystemTheme
lparameters nTheme

   *!* #DEFINE xtpSystemThemeUnknown 0 && No known theme in use
   *!* #DEFINE xtpSystemThemeBlue 1 && Blue theme in use
   *!* #DEFINE xtpSystemThemeOlive 2 && Olive theme in use
   *!* #DEFINE xtpSystemThemeSilver 3 && Silver theme in use
   *!* #DEFINE xtpSystemThemeRoyale 4 && Silver theme in use
   *!* #DEFINE xtpSystemThemeAero 5 && Silver theme in use
   *!* #DEFINE xtpSystemThemeAuto 6 && Use OS theme.

  
   if empty(nTheme)
      nTheme = 5
   endif


   this.GlobalSettings_CommandBars.ColorManager.SystemTheme = nTheme
   this.GlobalSettings_PropertyGrid.ColorManager.SystemTheme = nTheme
   this.GlobalSettings_ReportControl.ColorManager.SystemTheme = nTheme
   this.GlobalSettings_SuiteControls.ColorManager.SystemTheme = nTheme
   this.GlobalSettings_ShortCutBar.ColorManager.SystemTheme = nTheme
   this.GlobalSettings_TaskPanel.ColorManager.SystemTheme = nTheme
   this.GlobalSettings_Calendar.ColorManager.SystemTheme = nTheme
   this._setResource()


endProc

****************************************************************************************************************
SOme times I need to look in windows register to find this names. (ex: Run regedit and search "calendardialogs")
*



-------------
wlcabral


Posted By: WillieVS
Date Posted: 11 February 2008 at 8:35am
mmm cVersion, nice one.
 
With a lot of trial and error I got my calendar to work. I even created my own form for editing and creating of events. Well I did it because I did not know that the OCX contains / manages those too. 
 
To my astonishment I could edit the appointments from within the reminder dialog window.
 
Although very nice, I need other fields like a Rep code selection, customer selection and so on.
 
Do you know how I can change the behavior of the Reminder to run my code on editing an existing object?
 
Thanks for your help


-------------
Willie van Schalkwyk
http://www.cyberprop.com


Posted By: wlcabral
Date Posted: 11 February 2008 at 11:26am
 Theoretically :
 
.EnableReminders(.t.)
 
All events have a mk:@MSITStore:C:\Program%20Files\Codejock%20Software\ActiveX\Xtreme%20SuitePro%20ActiveX%20v11.2.2\Help\SymbolReference.chm::/XtremeCalendarControl~CalendarEvent~Reminder.html - Reminder  property that can be used to set a reminder for the event. 
 
OnReminders event Occurs when reminders are enabled, disabled, snoozed, dismissed, and fired....
 
I said Theoretically because (for me) the  onReminders() event was fired, but the second paremeter (ByVal mk:@MSITStore:C:\Program%20Files\Codejock%20Software\ActiveX\Xtreme%20SuitePro%20ActiveX%20v11.2.2\Help\SymbolReference.chm::/XtremeCalendarControl~CalendarControl~OnReminders_EV.html# - Reminder As mk:@MSITStore:C:\Program%20Files\Codejock%20Software\ActiveX\Xtreme%20SuitePro%20ActiveX%20v11.2.2\Help\SymbolReference.chm::/XtremeCalendarControl~CalendarReminder.html - CalendarReminder ) was NULL ...
 


-------------
wlcabral


Posted By: Saturnin
Date Posted: 27 February 2008 at 7:55am
I have got the same probleme !
The second parameter is NULL :(
 
SOS :x


Posted By: WillieVS
Date Posted: 28 February 2008 at 5:28am
Hi
I dont think you going to get an answer here why it is happending. I suggest you open a support case and then once you have the answer you can let us know too


-------------
Willie van Schalkwyk
http://www.cyberprop.com


Posted By: Saturnin
Date Posted: 17 March 2008 at 5:38am
i did !
 
the answer :
 
"
 
Hello,

Please take a look at the definition of parameters. When the first is 3 -- NULL value of the second one is correct.

xtpCalendarRemindersMonitoringStarted = 1, // Reminder = NULL
xtpCalendarRemindersMonitoringStopped = 2, // Reminder = NULL
xtpCalendarRemindersFire = 3, // Reminder = NULL

xtpCalendarReminderSnoozed = 4, // Reminder = Snoozed reminder
xtpCalendarReminderDismissed = 5, // Reminder = Dismissed reminder
xtpCalendarReminderDismissedAll = 6, // Reminder = NULL

Instead, you can access Reminders collection and iterate them.
 
"
 
can someone understand ? :/


Posted By: wlcabral
Date Posted: 17 March 2008 at 7:42am

They are telling that we don’t have this information when mk:@MSITStore:C:\Program%20Files\Codejock%20Software\ActiveX\Xtreme%20SuitePro%20ActiveX%20v11.2.2\Help\SymbolReference.chm::/XtremeCalendarControl~CalendarControl~OnReminders_EV.html - OnReminders  is fired.  We need to check manually through the Reminders collection, something (FOXPRO) like:

 

With xtremeCalendar

 

For i = 0 to .Reminders.Count-1

     

      oEvent = .Item(i).Event

      if .Item(i).NextReminderTime < datetime()

 

            if messagebox(oEvent.Subject, 4) = 6

                  .Item(i).Dismiss()

            endif

 

      endif

 

next

 

endWith

 



-------------
wlcabral


Posted By: Saturnin
Date Posted: 17 March 2008 at 10:52am

it's not cool :(

an event (in calendar) call the event "OnReminders". It could be logique to give it as parameter.

even if there are more than one event which call the event "OnReminders", it could send a collection of events.

 
thx you wlcabral for your help.


Posted By: sensum
Date Posted: 23 February 2009 at 8:22pm
Hello, this is an addition and correction of the example shown above in FOXPRO. Thanks to Cabral published by example.
 
*** ActiveX Control Event ***
lparameters action, reminder

local i, oEvent, cAlert

with thisform.calendar
 for i = 0 to .Reminders.count-1
  oEvent = .reminders.item(i).event
   if .reminders.item(i).NextReminderTime < datetime()
    cAlert = "Para as " + ttoc(oEvent.starttime) + " foi agendado o seguinte compromisso :" + chr(13) + chr(13) + ;
    alltrim(oEvent.Subject) + chr(13) + chr(13) +;
    "Você deseja receber um novo aviso sobre este compromisso ? "
    if messagebox(cAlert, 4,"Atenção!") = 7
     .reminders.item(i).Dismiss()
     oEvent.reminder = .f.
     thisform.calendar.DataProvider.ChangeEvent(oEvent)
    endif
   endif
 next
endwith




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