expression.CancelSelection()
where expression is a variable that represents a IbmScreen Object
expression.CancelSelection()
This sample selects the entire screen area and copies it to the clipboard. If the screen contains the "PASSWORD" field, it is unslected and the text is not copied.
To run this sample in the demo session, Open an ibm3270 session with the host IP address set to demo:ibm3270.sim. Then paste the code into the ThisIbmScreen code window. Enter any credentials to log in and then enter "ispf" to go to the next screen. Then paste the contents of the clipboard to a text editor. Check that the screen that contains PASSWORD is not copied.
Private Sub IbmScreen_NewScreenReady(ByVal sender As Variant) ThisIbmScreen.SelectAll If ThisIbmScreen.GetText(21, 2, 8) = "PASSWORD" Then ThisIbmScreen.CancelSelection End If ThisIbmScreen.CopyAppend End Sub