Better approach is to store these value in shared objects.
Alternative is to use interop FindWindow, and take the handle of textbox and read the contents
Private Declare Auto Function FindWindow Lib "user32.dll" ( _
<MarshalAs(UnmanagedType.LPTStr), [In]()> ByVal lpClassName As
String, _
<MarshalAs(UnmanagedType.LPTStr), [In]()> ByVal lpWindowName As
String _
) As IntPtr
Private Declare Auto Function FindWindowEx Lib "user32.dll" ( _
ByVal hWndParent As IntPtr, _
ByVal hWndChildAfter As IntPtr, _
<MarshalAs(UnmanagedType.LPTStr), [In]()> ByVal lpszClass As
String, _
<MarshalAs(UnmanagedType.LPTStr), [In]()> ByVal lpszWindow As
String _
) As IntPtr
Dim hWnd As IntPtr = FindWindow(vbNullString, "FSM")
If hWnd.Equals(IntPtr.Zero) Then
Return
End If
Dim hWndButton As IntPtr = _
FindWindowEx(hWnd, IntPtr.Zero, "BUTTON", "Button 1")
If hWndButton.Equals(IntPtr.Zero) Then
Return
End If
....
///
Modify "BUTTON" to win32 text box class name. Try this VB code