Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 29 of 37

JANUS PSK for Basic, Version 2.1 Reference Manual, pages 281 to 290

Pages 281 to 290 of 362

The original document is the PDF (601 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Intermec J2020, Intermec J2010 and Intermec J2050

Page 281

imSetDisplayMode – Visual Basic

3

Example 1 '**************** imSetDisplayMode ***************** REM $INCLUDE: 'im20vbas.bi' status% = imSetDisplayMode(imSizeMode20X16,VideoMode%,ScrollMode%,CharHt%) status% = imGetDisplayMode(VARPTR(SizeMode%), VARSEG(SizeMode%), VARPTR(VideoMode%), VARSEG(VideoMode%), VARPTR(ScrollMode%), VARSEG(ScrollMode%), VARPTR(CharHt%), VARSEG(CharHt%)) print "Size =";SizeMode% print "Video =";VideoMode% print "Scroll =";srollMode% print "CharHt =";CharHt% input "Waiting>>",response$ status% = imSetDisplayMode(imSizeMode20X8,VideoMode%,ScrollMode%,CharHt%) status% = imGetDisplayMode(VARPTR(SizeMode%), VARSEG(SizeMode%), VARPTR(VideoMode%), VARSEG(VideoMode%), VARPTR(ScrollMode%), VARSEG(ScrollMode%), VARPTR(CharHt%), VARSEG(CharHt%)) print "Size =";SizeMode% print "Video =";VideoMode% print "Scroll =";srollMode% print "CharHt =";CharHt% input "Waiting>>",response$ END

Example 2 '************************************************************************* ' FILE NAME: setdisp.bas ' DESCRIPTION: Tests various display configurations '************************************************************************* ' The PSK keeps track of display information through the normal BIOS ' calls. Basic, however, uses its own set of interrupts. This results ' in the reader wedge getting out of synch with standard basic print and ' input statements if a display size other than 80x25 or 40x25 is used. ' ' If one of the other display modes is desired, the application needs to ' display data by using INT 10H instead of the normal basic print ' statements. This is an example of how to do this. Note that this also ' applies to printing a prompt with the input statement. ' ' RWTSR must be loaded for this program to execute. '************************************************************************* ' $INCLUDE: 'im20vbas.bi' ' $INCLUDE: 'vbdos.bi' declare sub PrintString (TextString$) dim shared inRegs as RegType, outRegs AS RegType CONST bufsize = 300 DIM inString AS STRING * bufsize cls status% = imGetDisplayMode(SizeModeTmp%,videoModeTmp%,scrollModeTmp%,charHtTmp%) ' ' ' '

Instead of: print "Size =";sizeModeTmp% print "Video =";videoModeTmp% print "Scroll =";srollModeTmp%

3-115

Page 282

imSetDisplayMode – Visual Basic

' ' ' ' print "CharHt =";charHtTmp% input "Waiting>>",response$ use: PrintString "Size =" PrintString STR$(sizeModeTmp%) PrintString "\nVideo =" PrintString STR$(videoModeTmp%) PrintString "\nScroll =" PrintString STR$(scrollModeTmp%) PrintString "\nCharHt =" PrintString STR$(charHtTmp%) PrintString "\nWaiting>" status% = imReceiveInput(ImKeyboardSelect, imInfiniteTimeout, VARPTR(source%), VARSEG(source%),VARPTR(inString), VARSEG(inString)) cls status% = imSetDisplayMode(imSizeMode20X16,videoMode%,scrollMode%,charHt%) status% = imGetDisplayMode(VARPTR(SizeMode%), VARSEG(SizeMode%), VARPTR(VideoMode%), VARSEG(VideoMode%), VARPTR(ScrollMode%), VARSEG(ScrollMode%), VARPTR(CharHt%), VARSEG(CharHt%)) PrintString "Size =" PrintString STR$(sizeMode%) PrintString "\nVideo =" PrintString STR$(videoMode%) PrintString "\nScroll =" PrintString STR$(scrollMode%) PrintString "\nCharHt =" PrintString STR$(charHt%) PrintString "\nWaiting>" status% = imReceiveInput(ImKeyboardSelect, imInfiniteTimeout, VARPTR(source%), VARSEG(source%),VARPTR(inString), VARSEG(inString) cls status% = imSetDisplayMode(imSizeMode20X8,videoMode%,scrollMode%,charHt%) status% = imGetDisplayMode(VARPTR(SizeMode%), VARSEG(SizeMode%), VARPTR(VideoMode%), VARSEG(VideoMode%), VARPTR(ScrollMode%), VARSEG(ScrollMode%), VARPTR(CharHt%), VARSEG(CharHt%)) PrintString "Size =" PrintString STR$(sizeMode%) PrintString "\nVideo =" PrintString STR$(videoMode%) PrintString "\nScroll =" PrintString STR$(scrollMode%) PrintString "\nCharHt =" PrintString STR$(charHt%) PrintString "\nWaiting>" status% = imReceiveInput(ImKeyboardSelect, imInfiniteTimeout, VARPTR(source%), VARSEG(source%),VARPTR(inString), VARSEG(inString) cls status% = imSetDisplayMode(imSizeMode10X16,videoMode%,scrollMode%,charHt%) status% = imGetDisplayMode(VARPTR(SizeMode%), VARSEG(SizeMode%), VARPTR(VideoMode%), VARSEG(VideoMode%), VARPTR(ScrollMode%), VARSEG(ScrollMode%), VARPTR(CharHt%), VARSEG(CharHt%)) PrintString "Size =" PrintString STR$(sizeMode%) PrintString "\nVideo =" PrintString STR$(videoMode%) PrintString "\nScroll=" PrintString STR$(scrollMode%) PrintString "\nCharHt=" PrintString STR$(charHt%)

3-116

Page 283

imSetDisplayMode – Visual Basic

3

PrintString "\nWaiting>" status% = imReceiveInput(ImKeyboardSelect, imInfiniteTimeout, VARPTR(source%), VARSEG(source%),VARPTR(inString), VARSEG(inString) cls status% = imSetDisplayMode(imSizeMode10X8,videoMode%,scrollMode%,charHt%) status% = imGetDisplayMode(VARPTR(SizeMode%), VARSEG(SizeMode%), VARPTR(VideoMode%), VARSEG(VideoMode%), VARPTR(ScrollMode%), VARSEG(ScrollMode%), VARPTR(CharHt%), VARSEG(CharHt%)) PrintString "Size =" PrintString STR$(sizeMode%) PrintString "\nVideo =" PrintString STR$(videoMode%) PrintString "\nScroll=" PrintString STR$(scrollMode%) PrintString "\nCharHt=" PrintString STR$(charHt%) PrintString "\nWaiting>" status% = imReceiveInput(ImKeyboardSelect, imInfiniteTimeout, VARPTR(source%), VARSEG(source%),VARPTR(inString), VARSEG(inString) cls status% = imSetDisplayMode(sizeModeTmp%,videoModeTmp%,scrollModeTmp%,charHtTmp%) status% = imGetDisplayMode(VARPTR(SizeMode%), VARSEG(SizeMode%), VARPTR(VideoMode%), VARSEG(VideoMode%), VARPTR(ScrollMode%), VARSEG(ScrollMode%), VARPTR(CharHt%), VARSEG(CharHt%)) PrintString "Size =" PrintString STR$(sizeMode%) PrintString "\nVideo =" PrintString STR$(videoMode%) PrintString "\nScroll =" PrintString STR$(scrollMode%) PrintString "\nCharHt =" PrintString STR$(charHt%) PrintString "\nWaiting>" status% = imReceiveInput(ImKeyboardSelect, imInfiniteTimeout, VARPTR(source%), VARSEG(source%),VARPTR(inString), VARSEG(inString) END ' ******************************************************************** ' Prints a string using INT 10H ' Prints a newline when "\n" is found ' ******************************************************************** SUB PrintString(TextString$) Length% = LEN(TextString$) FOR I% = 1 to Length% IF ASC(MID$(TextString$, I%, 1)) = 92 AND ASC(MID$(TextString$, I%+1, 1)) = 110 THEN inRegs.ax = &HE0D ' Print CR inRegs.bx = &H0 INTERRUPT &H10, inRegs, outRegs inRegs.ax = &HE0A ' Print LF inRegs.bx = &H0 INTERRUPT &H10, inRegs, outRegs I% = I% + 1 ELSE inRegs.ax = &HE00 + ASC(MID$(TextString$, I%, 1)) inRegs.bx = &H0 INTERRUPT &H10, inRegs, outRegs END IF

3-117

Page 284

imSetDisplayMode – Visual Basic

NEXT END SUB ' ******************************************************************** ' END OF FILE: setdisp.bas ' COPYRIGHT (c) 1995 INTERMEC CORPORATION, ALL RIGHTS RESERVED

3-118

Page 285

imSetFollowCursor – Visual Basic

3 imSetFollowCursor Purpose:

When the display is in 80 x 25 mode, the viewport follows the cursor as it moves. This function enables or disables the follow-the-cursor feature.

Syntax:

REM $INCLUDE: 'im20vbas.bi' FUNCTION imSetFollowCursor%(FollowCursor)

IN Parameters:

The FollowCursor parameter is one of these constants: imEnable imDisable

Enable follow-the-cursor mode Disable follow-the-cursor mode

OUT Parameters:

None.

Return Value:

This function returns one of the standard status codes defined in Appendix A, “Status Codes.”

Notes:

The display must be in 80 x 25 mode for this function to work correctly. This function has no effect on the JANUS 2050.

See Also:

imGetFollowCursor

Example '**************** imSetFollowCursor **************** REM $INCLUDE: 'im20vbas.bi' status% = imGetFollowCursor(followCursor%) PRINT "Follow is ";followCursor% status% = imSetFollowCursor(imDisable) status% = imGetFollowCursor(followCursor%) PRINT "Follow is ";followCursor% status% = imSetFollowCursor(imEnable) status% = imGetFollowCursor(followCursor%) PRINT "Follow is ";followCursor% END

3-119

Page 286

imSetInputMode – Visual Basic imSetInputMode Purpose:

This function clears the input buffers and sets the input manager to one of three modes: Wedge, Programmer, or Desktop.

Syntax:

REM $INCLUDE: 'im20vbas.bi' SUB imSetInputMode(Mode)

IN Parameters:

The Mode parameter is one of these constants: imWedge imProgrammer imDesktop

Wedge mode Programmer mode Desktop mode

OUT Parameters:

None.

Return Value:

None.

Notes:

You must install the Reader Wedge to use this function. For information on loading RWTSR.EXE, see “Runtime Requirements” earlier in this chapter. There are three different reader input modes: Wedge, Programmer, and Desktop. These modes affect how the reader interprets and stores input. Wedge Mode Keypad and label input goes into the keyboard buffer with minimal filtering. Wedge mode is the default mode at the DOS prompt after reader services (RSERVICE.EXE) is loaded. This mode should be used when the reader is running an application that uses the Virtual Wedge. When in this mode, use standard input functions to retrieve keypad or label input. Wedge mode does not take full advantage of the reader’s power management capabilities. You will probably notice reduced battery life when in this mode compared to being in either programmer or desktop mode. For more information on power management, see Chapter 3, “Advanced Programming,” in the JANUS PSK for C/C++ Reference Manual.

3-120

Page 287

imSetInputMode – Visual Basic

3

Programmer Mode Inputs are echoed to the screen. Reader commands are executed as well as saved. Use this mode when the reader is executing IRL commands. In general, when you are running an application that uses the function libraries or software interrupts, the reader should be in Programmer mode. Desktop Mode The application is responsible for retrieving and displaying input. Use this mode when you need detailed information about a pressed key. Each character returned consists of four bytes: the ASCII code, scan code, and two bytes of keyboard flags (Shift, Ctrl, Alt). Upon exiting the program, set the input mode to imWedge so that DOS will work as expected. For more information about reader input modes, see “Reader Input Modes,” in Chapter 3, “Advanced Programming,” in the JANUS PSK for C/C++ Reference Manual. See Also:

imGetInputMode, imReceiveInput

Example See example for imGetInputMode and imReceiveInput.

3-121

Page 288

imSetKeyclick – Visual Basic imSetKeyclick Purpose:

Each time you press a key, the reader can emit a click. This function enables or disables the keyclick.

Syntax:

REM $INCLUDE: 'im20vbas.bi' FUNCTION imSetKeyclick%(KeyClick)

IN Parameters:

The KeyClick parameter is one of these constants: imEnable imDisable

Enable the keyclick Disable the keyclick

OUT Parameters:

None.

Return Value:

This function returns one of the standard status codes defined in Appendix A, “Status Codes.”

See Also:

imGetKeyclick

Example See example for imGetKeyclick.

3-122

Page 289

imSetViewportLock – Visual Basic

3 imSetViewportLock Purpose:

This function enables or disables the keys that move the viewport.

Syntax:

REM $INCLUDE: 'im20vbas.bi' FUNCTION imSetViewportLock%(VpLock)

IN Parameters:

The VpLock parameter is one of these constants: imEnable imDisable

Lock the viewport Unlock the viewport

OUT Parameters:

None.

Return Value:

This function returns one of the standard status codes defined in Appendix A, “Status Codes.”

Notes:

The display must be in 80 x 25 mode for this function to work correctly. This function controls whether the viewport moves (unlocked) or does not move (locked) when the viewport movement keys are pressed. This function has no effect on the JANUS 2050.

See Also:

imGetViewportLock, imSetFollowCursor

Example See example for imGetViewportLock.

3-123

Page 290

imSetWarmBoot – Visual Basic imSetWarmBoot Purpose:

This function enables or disables the Ctrl-Alt-Del warm boot key sequence. When disabled, the Ctrl-Alt-Del key sequence does not reboot the reader.

Syntax:

REM $INCLUDE: 'im20vbas.bi' FUNCTION imSetWarmBoot% ( WarmBoot )

IN Parameters:

The WarmBoot parameter is one of these constants: imEnable imDisable

Enable Ctrl-Alt-Del warm boot Disable Ctrl-Alt-Del warm boot

OUT Parameters:

None.

Return Value:

This function returns one of the standard status codes defined in Appendix A, “Status Codes.”

See Also:

imGetWarmBoot

Example '**************** imSetWarmBoot ******************** REM $INCLUDE: 'im20vbas.bi' status% = imSetWarmBoot(imDisable) PRINT "Disabling <BOOT>" status% = imGetWarmBoot (VARPTR(ctrlKey%), VARSEG(ctrlKey%) IF ctrlKey% = imEnable THEN PRINT "<BOOT> enabled" ELSE PRINT "<BOOT> disabled" END IF INPUT "Test it1>>",response$ status% = imSetWarmBoot(imEnable) PRINT "Enabling <BOOT>" INPUT "Test it1>>",response$ END

3-124