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

Save data!

 Post Reply Post Reply
Author
Message
moe188 View Drop Down
Senior Member
Senior Member


Joined: 27 March 2006
Status: Offline
Points: 220
Post Options Post Options   Thanks (0) Thanks(0)   Quote moe188 Quote  Post ReplyReply Direct Link To This Post Topic: Save data!
    Posted: 28 July 2006 at 7:49pm
Hi,
I want to let the user select a start and end time, then enter a subject, but once the user click <Enter>, the program will ask him if he wants to save the data (display message), otherwise the selection will be deleted.
How can I do that?
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: 30 July 2006 at 5:27pm
Hi,

Catch EventAdded event, something like following:

Private Sub CalendarControl_EventAdded(ByVal EventID As Long)
    Dim pEvent As CalendarEvent
    Set pEvent = CalendarControl.DataProvider.GetEvent(EventID)
   
    If Not pEvent Is Nothing Then
        CalendarControl.RedrawControl
        If MsgBox("Would you like to save the data?", vbYesNo) = vbYes Then
            ' do nothing
        Else
            ' delete event
            CalendarControl.DataProvider.DeleteEvent pEvent
        End If
    End If
End Sub


--
WBR,
Serge
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.125 seconds.