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

Reminder

 Post Reply Post Reply
Author
Message
WillieVS View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2008
Location: South Africa
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote WillieVS Quote  Post ReplyReply Direct Link To This Post Topic: Reminder
    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
Back to Top
WillieVS View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2008
Location: South Africa
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote WillieVS Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
wlcabral View Drop Down
Groupie
Groupie
Avatar

Joined: 25 April 2007
Location: Brazil
Status: Offline
Points: 72
Post Options Post Options   Thanks (0) Thanks(0)   Quote wlcabral Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
WillieVS View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2008
Location: South Africa
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote WillieVS Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
wlcabral View Drop Down
Groupie
Groupie
Avatar

Joined: 25 April 2007
Location: Brazil
Status: Offline
Points: 72
Post Options Post Options   Thanks (0) Thanks(0)   Quote wlcabral Quote  Post ReplyReply Direct Link To This Post Posted: 11 February 2008 at 11:26am
 Theoretically :
 
.EnableReminders(.t.)
 
All events have a 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 Reminder As CalendarReminder) was NULL ...
 
wlcabral
Back to Top
Saturnin View Drop Down
Newbie
Newbie


Joined: 27 February 2008
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Saturnin Quote  Post ReplyReply Direct Link To This Post Posted: 27 February 2008 at 7:55am
I have got the same probleme !
The second parameter is NULL :(
 
SOS :x
Back to Top
WillieVS View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2008
Location: South Africa
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote WillieVS Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Saturnin View Drop Down
Newbie
Newbie


Joined: 27 February 2008
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Saturnin Quote  Post ReplyReply Direct Link To This Post 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 ? :/
Back to Top
wlcabral View Drop Down
Groupie
Groupie
Avatar

Joined: 25 April 2007
Location: Brazil
Status: Offline
Points: 72
Post Options Post Options   Thanks (0) Thanks(0)   Quote wlcabral Quote  Post ReplyReply Direct Link To This Post Posted: 17 March 2008 at 7:42am

They are telling that we don’t have this information when 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
Back to Top
Saturnin View Drop Down
Newbie
Newbie


Joined: 27 February 2008
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote Saturnin Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
sensum View Drop Down
Newbie
Newbie
Avatar

Joined: 21 February 2009
Location: Brazil
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote sensum Quote  Post ReplyReply Direct Link To This Post 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

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.141 seconds.