This method sends a string of keystrokes to the virtual screen. This
method acts as if keystrokes were being typed from the keyboard of a terminal.
The keystrokes will be sent to the location given. If no location is provided,
the keystrokes will be sent to the current cursor location.
Screen.SendKeys( text,
location )
Parameter |
Description |
text |
String of characters to be sent to the virtual screen. |
location |
The offset position where the string of keys is to be written. For row 1 column 1 of the screen display buffer, the offset is 0. |
|
Public AllSessions As OhioSessions Private Sub Form_Load() Set AllSessions = New OhioSessions MySession.Connect End Sub Private Sub Command1_Click() MyScreen.SendKeys "log", MyScreen.Cursor End Sub Private Sub MySession_OnScreenChanged(ByVal inUpdate As OHIO_UPDATE, ByVal inStart As Long, ByVal inEnd As Long) Label1 = MyScreen.String End Sub Private Sub Form_Unload(Cancel As Integer) MySession.Disconnect End Sub |
|
#define OHIO_UPDATE_HOST 0 BEGIN_DISPATCH_MAP(CMyView, CView) DISP_FUNCTION_ID(CMyView, "OnScreenChanged", 1, OnScreenChanged, VT_EMPTY, VTS_I4 VTS_I4 VTS_I4) END_DISPATCH_MAP() void CMyView::OnScreenChanged(long iUpdate,
long iStart, long iEnd) if ( iUpdate == OHIO_UPDATE_HOST ) long nPos; m_MyScreen.SendKeys( "logon p390a",
m_MyScreen.GetCursor() ); } m_MyScreen.PutString( "ibm3270",
m_MyScreen.GetCursor() ); } } } |
|
try { screen.SendKeys ("1", screen.Cursor); screen.SendAid (OHIO_KEY_ENTER); // Send the ENTER key } catch (Exception ex) { MessageBox.Show ("Exception: " + ex); } |