I need to call a c# user control when a COBOL window is minimized or maximized. The window action works correctly, but I can't find an event or message that I can trap.
I need to call a c# user control when a COBOL window is minimized or maximized. The window action works correctly, but I can't find an event or message that I can trap.
01 EVENT-STATUS.
03 EVENT-TYPE PIC X(4) COMP-X.
03 EVENT-WINDOW-HANDLE USAGE HANDLE OF WINDOW.
03 EVENT-CONTROL-HANDLE USAGE HANDLE.
03 EVENT-CONTROL-ID PIC XX COMP-X.
03 EVENT-DATA-1 USAGE SIGNED-SHORT.
03 EVENT-DATA-2 USAGE SIGNED-LONG.
03 EVENT-ACTION PIC X COMP-X.
When an event occurs, you can obtain the value of event-action. That should contain:
78 ACTION-MINIMIZE VALUE 20.
78 ACTION-MAXIMIZE VALUE 21.
78 ACTION-RESTORE VALUE 22.
Based on the value, you then call your C# routine.
I need to call a c# user control when a COBOL window is minimized or maximized. The window action works correctly, but I can't find an event or message that I can trap.
There was already an event procedure assigned to the window, but it was hiding in a CPY file. I checked EVENT-ACTION and its value was zero. So I checked EVENT-TYPE, and its value was 4114 (NTF-RESIZED), which means that EVENT-DATA-1 and EVENT-DATA-2 contained the new height and width of the window. I'd already written a call to C# for when the user manually resizes the window by dragging, which also generates a NTF-RESIZED event. So with the window dimensions, I don't need to separately handle minimize/maximize/restore. I just need to pass the dimensions to C#, where I can resize the user control to the new size available in the COBOL window.
Shjerpe, thank you for the nudge in the right direction. It would be interesting to know how the ACTIONs could work as you suggested. It may help someone in the future.
I need to call a c# user control when a COBOL window is minimized or maximized. The window action works correctly, but I can't find an event or message that I can trap.
I need to call a c# user control when a COBOL window is minimized or maximized. The window action works correctly, but I can't find an event or message that I can trap.
documentation.microfocus.com/.../BKININEVENIN6.2.html
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.