The Press method

Top  Previous  Next

The Press method sends an Attention Identifier Key along with the modified fields. Modified fields can be input fields (unprotected) or sometimes protected fields having the property Modified set to True.

 

VB.NET

tnxxxx.Press (aidKey as AidKey)

tnxxxx.Press (aidKey As String)

 

C#

tnxxxx.Press (AidKey aidKey);

tnxxxx.Press (string aidKey);

 

The following graphic shows the sequence of actions corresponding to the asynchronous Press method:

 

Host Integration Pack TN Bridge Vb.net C# Delphi ActiveX asynchronous press method

 

 VB.NET:

 Private Sub cmdLogin_Click(eventSender As System.Object, eventArgs As System.EventArgs)

        ' this code sets userId in Field located at Row 10 Column 2

    tn3270.EditFields["R10C2"].Data = "puser"

        ' this code sets the password in Field located at Row 12 Column 2

    tn3270.EditFields["R12C2"].Data = "k2156"

        ' this code sends the ENTER Attention Identifier Key along with all modified EditFields

         tn3270.Press("Enter")

 End Sub

 

 C#:

 private void cmdLogin_Click(object eventSender, System.EventArgs eventArgs)

 {

        // this code sets userId in Field located at Row 10 Column 2

    tn3270.EditFields["R10C2"].Data = "puser";

        // this code sets the password in Field located at Row 12 Column 2

    tn3270.EditFields["R12C2"].Data = "k2156";

        // this code sends the ENTER Attention Identifier Key along with all modified EditFields

         tn3270.Press("Enter");

 }