Highlighted
Absent Member.
Absent Member.
536 views

[archive] Caps Lock Scroll Lock

[Migrated content. Thread originally posted on 30 January 2003]

I am using this program with thread he is sleeping and wakeing once and a while.





PROCEDURE DIVISION USING LINK-REC.
MAIN-LOGIC SECTION.
DEBUT.

PERFORM 0000-INITIALISATION.

PERFORM 100-PRINCIPALE.

FIN.

EXIT-PROGRAM.
EXIT PROGRAM.
0000-INITIALISATION.
SET ENVIRONMENT "DLL_CONVENTION" TO "1".
CALL "User32.dll".
100-PRINCIPALE.

PERFORM UNTIL 1=2
CALL "GetKeyboardState" USING BY REFERENCE KEY-TABLE
GIVING RET-VALUE
MOVE LC-FONT-SMALL TO DEFAULT-FONT
MOVE LC-MAIN-HANDLE TO MAIN-HANDLE
RECEIVE FIELD FROM THREAD MAIN-HANDLE
BEFORE TIME 50
STATUS IN WS-STATUS
ON EXCEPTION CONTINUE
END-RECEIVE
move spaces to field-1 field-2 field-3 field-4
IF WS-STATUS = "00" OR "04"
MOVE FIELD TO WS-OPTION
END-IF
IF TABL(VK_INSERT + 1) = 1
MOVE "INS" TO FIELD-1
END-IF
IF TABL(VK_CAPITAL + 1) = 1
MOVE "CAPS" TO FIELD-2
END-IF
IF TABL(VK_NUMLOCK + 1) = 1
MOVE "NUM" TO FIELD-3
END-IF
IF TABL(VK_SCROLL + 1) = 1
MOVE "SCRL" TO FIELD-4
END-IF
IF(LAST-CAPITAL NOT = FIELD-2 OR
LAST-INSERT NOT = FIELD-1 OR
LAST-SCROLL NOT = FIELD-4 OR
LAST-NUMLOCK NOT = FIELD-3 OR
LAST-OPTION NOT = WS-OPTION)

DISPLAY STATUS-BAR
PANEL-WIDTHS ( 30, 10, 10, 12, 5,5,5,5,5,10,5 )
PANEL-STYLE ( 1, 1, 1 , 1, 1,1,1,1,1, 1,1)
PANEL-TEXT ( WS-DESC,
WS-DESC-DATE,
LC-UTILISATEUR
LC-IMP-ID
LC-NO-ECRAN
FIELD-1
FIELD-2
FIELD-3
FIELD-4
LC-PROG-NAME
LC-VERSION-LOGICIEL)
font DEFAULT-FONT
GRIP
MOVE FIELD-2 TO LAST-CAPITAL
MOVE FIELD-1 TO LAST-INSERT
MOVE FIELD-4 TO LAST-SCROLL
MOVE FIELD-3 TO LAST-NUMLOCK
MOVE WS-OPTION TO LAST-OPTION
END-IF
END-PERFORM.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.