'This example displays the fraction symbol ¼ (using the decimal code x0BC) followed by a carriage return (using the \r special character).
Sub DisplayText2Example()
Dim rcode As ReturnCode
rcode = ThisScreen.DisplayText2("\x0BC\r", DisplayTextOption_HexData)
End Sub
'This example gets a row of text from the screen and displays it with Bold and Blink attributes
'You can run this example by creating a VT session with the Host name/IP address set to 'demo:unix', logging in with any credentials and entering demodata to navigate to the
'XYZ Company Sales graph. Then run this code in a code module.
Sub DisplayText2Example2()
Dim sequence, text As String
Dim point As ScreenPoint
Dim row, column, length As Integer
'Get the location of the text that starts with XYZ
Set point = ThisScreen.SearchText("XYZ", 1, 1, FindOptions_Forward)
'Set the starting row, the starting column, and the number of characters remaining on the line (length)
row = point.row
column = point.column
length = ThisScreen.DisplayColumns - column
'Get the text from the screen location to the end of the row
text = ThisScreen.GetText(row, column, length)
'Create the escape sequence, using the OpenVMS visual attributes escape sequences
'This statement moves the cursor to the starting row and column, Then it sets the Bold and Blink attributes ( \x01B[1;5m ), displays the text, and resets the attributes ( \x01B[0m ).
'(\x01B is the Esc character in Hex)
sequence = "\x01B[" & row & ";" & column & "H" & "\x01B[1;5m" & text & "\x01B[0m"
'Display the text using the escape sequence interpreted using the hexadecimal character conversions
ThisScreen.DisplayText2 sequence, DisplayTextOption_HexData
End Sub