[Migrated content. Thread originally posted on 29 January 2003]
I am using Active-X control ?Calendar Control 8.0? . I display a floating window in which the control occurred. I would like to be able to close the window when the CalendarDblClick method occurs. Please, help me!!!![Migrated content. Thread originally posted on 29 January 2003]
I am using Active-X control ?Calendar Control 8.0? . I display a floating window in which the control occurred. I would like to be able to close the window when the CalendarDblClick method occurs. Please, help me!!!!I suggest you contact Technical Support with sample source at hand, or, if you are able to provide this in a small sample you could post it here so we can see what you are trying to achieve.
[Migrated content. Thread originally posted on 29 January 2003]
I am using Active-X control ?Calendar Control 8.0? . I display a floating window in which the control occurred. I would like to be able to close the window when the CalendarDblClick method occurs. Please, help me!!!!I suggest you contact Technical Support with sample source at hand, or, if you are able to provide this in a small sample you could post it here so we can see what you are trying to achieve.
[Migrated content. Thread originally posted on 29 January 2003]
I am using Active-X control ?Calendar Control 8.0? . I display a floating window in which the control occurred. I would like to be able to close the window when the CalendarDblClick method occurs. Please, help me!!!!?
01 CALENDAR-SCN.
03 CALENDAR-ITEM Calendar
LINE 0.5 COL 0.5 SIZE 40 CELLS LINES 14.0,
EVENT PROCEDURE IS CALENDAR-EVENT-HANDLER..
??
SHOW-CALENDAR SECTION.
MOVE MY-DATE TO DATUM-1.
DISPLAY FLOATING WINDOW LINE 1 COL 1
SIZE 39 LINES 9.5
ERASE COLOR 257 BACKGROUND-LOW
TITLE TITLE-CALENDAR
SYSTEM MENU
BOXED, HANDLE IN CALENDAR-WINDOW.
MOVE 1 TO ACCEPT-CONTROL CONTROL-VALUE.
MOVE 0 TO KEY-INPUT.
DISPLAY CALENDAR-SCN.
MODIFY CALENDAR-ITEM Day = DD.
SHOW-CALENDAR-SCN.
PERFORM UNTIL ESC-PUSH OR EXIT-WINDOW
ACCEPT CALENDAR-SCN ON EXCEPTION
IF EVENT-OCCURED
EVALUATE EVENT-TYPE
WHEN CMD-CLOSE
SET EXIT-WINDOW TO TRUE
END-EVALUATE
END-IF
END-ACCEPT
END-PERFORM.
DESTROY CALENDAR-WINDOW.
MOVE 0 TO KEY-INPUT.
MOVE 1 TO ACCEPT-CONTROL.
SHOW-CALENDAR-END.
********
CALENDAR-EVENT-HANDLER SECTION.
EVALUATE EVENT-TYPE
WHEN MSG-AX-EVENT
EVALUATE EVENT-DATA-2
WHEN CalendarDblClick
INQUIRE CALENDAR-ITEM, Day IN DAY1,
Month IN MONTH1, Year IN YEAR1
MOVE DATE-1 TO MY-NEW-DATE
END-EVALUATE.
CALENDAR-EVENT-HANDLER-END.
[Migrated content. Thread originally posted on 29 January 2003]
I am using Active-X control ?Calendar Control 8.0? . I display a floating window in which the control occurred. I would like to be able to close the window when the CalendarDblClick method occurs. Please, help me!!!!?
01 CALENDAR-SCN.
03 CALENDAR-ITEM Calendar
LINE 0.5 COL 0.5 SIZE 40 CELLS LINES 14.0,
EVENT PROCEDURE IS CALENDAR-EVENT-HANDLER..
??
SHOW-CALENDAR SECTION.
MOVE MY-DATE TO DATUM-1.
DISPLAY FLOATING WINDOW LINE 1 COL 1
SIZE 39 LINES 9.5
ERASE COLOR 257 BACKGROUND-LOW
TITLE TITLE-CALENDAR
SYSTEM MENU
BOXED, HANDLE IN CALENDAR-WINDOW.
MOVE 1 TO ACCEPT-CONTROL CONTROL-VALUE.
MOVE 0 TO KEY-INPUT.
DISPLAY CALENDAR-SCN.
MODIFY CALENDAR-ITEM Day = DD.
SHOW-CALENDAR-SCN.
PERFORM UNTIL ESC-PUSH OR EXIT-WINDOW
ACCEPT CALENDAR-SCN ON EXCEPTION
IF EVENT-OCCURED
EVALUATE EVENT-TYPE
WHEN CMD-CLOSE
SET EXIT-WINDOW TO TRUE
END-EVALUATE
END-IF
END-ACCEPT
END-PERFORM.
DESTROY CALENDAR-WINDOW.
MOVE 0 TO KEY-INPUT.
MOVE 1 TO ACCEPT-CONTROL.
SHOW-CALENDAR-END.
********
CALENDAR-EVENT-HANDLER SECTION.
EVALUATE EVENT-TYPE
WHEN MSG-AX-EVENT
EVALUATE EVENT-DATA-2
WHEN CalendarDblClick
INQUIRE CALENDAR-ITEM, Day IN DAY1,
Month IN MONTH1, Year IN YEAR1
MOVE DATE-1 TO MY-NEW-DATE
END-EVALUATE.
CALENDAR-EVENT-HANDLER-END.
[Migrated content. Thread originally posted on 29 January 2003]
I am using Active-X control ?Calendar Control 8.0? . I display a floating window in which the control occurred. I would like to be able to close the window when the CalendarDblClick method occurs. Please, help me!!!!In your double click part of the event, set ACCEPT-CONTROL to 0, and your accept terminates.
[Migrated content. Thread originally posted on 29 January 2003]
I am using Active-X control ?Calendar Control 8.0? . I display a floating window in which the control occurred. I would like to be able to close the window when the CalendarDblClick method occurs. Please, help me!!!![Migrated content. Thread originally posted on 29 January 2003]
I am using Active-X control ?Calendar Control 8.0? . I display a floating window in which the control occurred. I would like to be able to close the window when the CalendarDblClick method occurs. Please, help me!!!![Migrated content. Thread originally posted on 29 January 2003]
I am using Active-X control ?Calendar Control 8.0? . I display a floating window in which the control occurred. I would like to be able to close the window when the CalendarDblClick method occurs. Please, help me!!!!IDENTIFICATION DIVISION.
PROGRAM-ID. Calendar-Demo.
ENVIRONMENT DIVISION.
SPECIAL-NAMES.
COPY "CALENDAR.DEF".
.
WORKING-STORAGE SECTION.
COPY "CRTVARS.DEF".
COPY "ACUGUI.DEF".
77 CALENDAR-WINDOW HANDLE OF WINDOW.
77 PROG-ACTION PIC 9.
88 FINISH-NOW VALUE 1.
77 KEY-STATUS
IS SPECIAL-NAMES CRT STATUS PIC 9(4) VALUE 0.
88 EXIT-PUSHED VALUE 27.
88 EVENT-OCCURED VALUE 96.
SCREEN SECTION.
01 CALENDAR-SCN.
03 CALENDAR-ITEM Calendar
LINE 1
COL 1
SIZE 40
LINES 14
EVENT PROCEDURE CALENDAR-EVENT-HANDLER.
PROCEDURE DIVISION.
MAIN-LOGIC.
DISPLAY STANDARD GRAPHICAL WINDOW
LINES 10
SIZE 30
BACKGROUND-LOW
TITLE "Empty window...".
DISPLAY FLOATING WINDOW
LINE 1
COL 1
SIZE 40
LINES 14
BACKGROUND-LOW
TITLE "Calendar Pop-up"
HANDLE IN CALENDAR-WINDOW.
INITIALIZE PROG-ACTION
KEY-STATUS.
DISPLAY CALENDAR-SCN UPON CALENDAR-WINDOW.
PERFORM UNTIL FINISH-NOW OR EXIT-PUSHED
ACCEPT CALENDAR-SCN ON EXCEPTION
IF EVENT-OCCURED
AND (EVENT-TYPE = CMD-CLOSE)
SET EXIT-PUSHED TO TRUE
END-IF
END-ACCEPT
END-PERFORM.
DESTROY CALENDAR-SCN.
DESTROY CALENDAR-WINDOW.
STOP RUN.
CALENDAR-EVENT-HANDLER.
EVALUATE EVENT-TYPE
WHEN MSG-AX-EVENT
EVALUATE EVENT-DATA-2
WHEN CalendarDblClick
SET EVENT-ACTION TO
EVENT-ACTION-TERMINATE
SET FINISH-NOW TO TRUE
END-EVALUATE
END-EVALUATE.
[Migrated content. Thread originally posted on 29 January 2003]
I am using Active-X control ?Calendar Control 8.0? . I display a floating window in which the control occurred. I would like to be able to close the window when the CalendarDblClick method occurs. Please, help me!!!!IDENTIFICATION DIVISION.
PROGRAM-ID. Calendar-Demo.
ENVIRONMENT DIVISION.
SPECIAL-NAMES.
COPY "CALENDAR.DEF".
.
WORKING-STORAGE SECTION.
COPY "CRTVARS.DEF".
COPY "ACUGUI.DEF".
77 CALENDAR-WINDOW HANDLE OF WINDOW.
77 PROG-ACTION PIC 9.
88 FINISH-NOW VALUE 1.
77 KEY-STATUS
IS SPECIAL-NAMES CRT STATUS PIC 9(4) VALUE 0.
88 EXIT-PUSHED VALUE 27.
88 EVENT-OCCURED VALUE 96.
SCREEN SECTION.
01 CALENDAR-SCN.
03 CALENDAR-ITEM Calendar
LINE 1
COL 1
SIZE 40
LINES 14
EVENT PROCEDURE CALENDAR-EVENT-HANDLER.
PROCEDURE DIVISION.
MAIN-LOGIC.
DISPLAY STANDARD GRAPHICAL WINDOW
LINES 10
SIZE 30
BACKGROUND-LOW
TITLE "Empty window...".
DISPLAY FLOATING WINDOW
LINE 1
COL 1
SIZE 40
LINES 14
BACKGROUND-LOW
TITLE "Calendar Pop-up"
HANDLE IN CALENDAR-WINDOW.
INITIALIZE PROG-ACTION
KEY-STATUS.
DISPLAY CALENDAR-SCN UPON CALENDAR-WINDOW.
PERFORM UNTIL FINISH-NOW OR EXIT-PUSHED
ACCEPT CALENDAR-SCN ON EXCEPTION
IF EVENT-OCCURED
AND (EVENT-TYPE = CMD-CLOSE)
SET EXIT-PUSHED TO TRUE
END-IF
END-ACCEPT
END-PERFORM.
DESTROY CALENDAR-SCN.
DESTROY CALENDAR-WINDOW.
STOP RUN.
CALENDAR-EVENT-HANDLER.
EVALUATE EVENT-TYPE
WHEN MSG-AX-EVENT
EVALUATE EVENT-DATA-2
WHEN CalendarDblClick
SET EVENT-ACTION TO
EVENT-ACTION-TERMINATE
SET FINISH-NOW TO TRUE
END-EVALUATE
END-EVALUATE.
[Migrated content. Thread originally posted on 29 January 2003]
I am using Active-X control ?Calendar Control 8.0? . I display a floating window in which the control occurred. I would like to be able to close the window when the CalendarDblClick method occurs. Please, help me!!!!When I try to call the control in my application this message is displaying ?Error creating AcviteX control COBOL error att 00F3C9 in programx.cbl?, because the control is not registred. How I can register the control automatically when I call this in my program?
[Migrated content. Thread originally posted on 29 January 2003]
I am using Active-X control ?Calendar Control 8.0? . I display a floating window in which the control occurred. I would like to be able to close the window when the CalendarDblClick method occurs. Please, help me!!!!What you would have to do, to catch this, is to introduce an error handler for objects. You do so by adding a section to the DECLARATIVES section:
object-exception section.
use after exception on object.
Assuming your application already do COPY the following files:
activex.def.
winhelp.def.
acugui.def
And has the following variables declared:
77 error-source pic x(30).
77 error-description pic x(50).
77 error-help-file pic x(200).
77 error-help-context usage unsigned-long.
77 choice pic 9.
You could have such a declaratives to catch this:
object-exception section.
use after exception on object.
object-exception-handler.
call "c$excepinfo" using
error-info
error-source
error-description
error-help-file
error-help-context.
evaluate true
when acu-e-initialstate
display message box "INITIAL-STATE"
end-evaluate.
if error-help-file = spaces then
display message box error-description
title error-source
icon mb-error-icon
else
display message box error-description h'0d'
"Do you want help ?"
title error-source
icon mb-error-icon
type is mb-yes-no
default is mb-yes
giving choice
if choice = 1 then
call "$winhelp" using error-help-file,
help-context
error-help-context
end-if
end-if
end declaratives.
Implement this, and this declaratives should catch your error, you should get the message "System Exception" in ERROR-SOURCE and the message "Class not registered" in ERROR-DESCRIPTION.
Then go ahead and find a way to execute the regsvr32 command.
[Migrated content. Thread originally posted on 29 January 2003]
I am using Active-X control ?Calendar Control 8.0? . I display a floating window in which the control occurred. I would like to be able to close the window when the CalendarDblClick method occurs. Please, help me!!!!What you would have to do, to catch this, is to introduce an error handler for objects. You do so by adding a section to the DECLARATIVES section:
object-exception section.
use after exception on object.
Assuming your application already do COPY the following files:
activex.def.
winhelp.def.
acugui.def
And has the following variables declared:
77 error-source pic x(30).
77 error-description pic x(50).
77 error-help-file pic x(200).
77 error-help-context usage unsigned-long.
77 choice pic 9.
You could have such a declaratives to catch this:
object-exception section.
use after exception on object.
object-exception-handler.
call "c$excepinfo" using
error-info
error-source
error-description
error-help-file
error-help-context.
evaluate true
when acu-e-initialstate
display message box "INITIAL-STATE"
end-evaluate.
if error-help-file = spaces then
display message box error-description
title error-source
icon mb-error-icon
else
display message box error-description h'0d'
"Do you want help ?"
title error-source
icon mb-error-icon
type is mb-yes-no
default is mb-yes
giving choice
if choice = 1 then
call "$winhelp" using error-help-file,
help-context
error-help-context
end-if
end-if
end declaratives.
Implement this, and this declaratives should catch your error, you should get the message "System Exception" in ERROR-SOURCE and the message "Class not registered" in ERROR-DESCRIPTION.
Then go ahead and find a way to execute the regsvr32 command.
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.