answers123
Technical User
Hi, I'm hoping someone can help me with this very frustrating problem.
Below is the VB.Net code where I have declared the necessary Extra! objects:
Imports EXTRA
Public Class Form2
Public Sys As EXTRA.ExtraSystem, Sess As EXTRA.ExtraSession, MyScreen As EXTRA.ExtraScreen, Srch As EXTRA.ExtraArea
I have the following code behind a button:
Private Sub btnGo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGo.Click
Try
Dim TField As String
MyScreen.SendKeys("*123456<ENTER>")
MyScreen.WaitHostQuiet(2000)
Srch = MyScreen.Search("ABC")
MyScreen.WaitHostQuiet(1200)
TField = Trim(MyScreen.GetString(Srch.Bottom, Srch.Left, MyScreen.Cols - Srch.Right))
Catch ex As Exception
MsgBox(ex.ToString, MsgBoxStyle.Exclamation)
Exit Sub
End Try
End Sub
The first time I click the button the Srch Function returns the correct co-ordinates, the next time I click the button it doesn't find anything in the Srch, it's as if it's running past it too quickly.
If I put a breakpoint before, or at, the Srch line and then continue it works fine. I have played around with the WaitHostQuiet but have had not luck.
Any help would be GREATLY appreciated.
Cheers
Below is the VB.Net code where I have declared the necessary Extra! objects:
Imports EXTRA
Public Class Form2
Public Sys As EXTRA.ExtraSystem, Sess As EXTRA.ExtraSession, MyScreen As EXTRA.ExtraScreen, Srch As EXTRA.ExtraArea
I have the following code behind a button:
Private Sub btnGo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGo.Click
Try
Dim TField As String
MyScreen.SendKeys("*123456<ENTER>")
MyScreen.WaitHostQuiet(2000)
Srch = MyScreen.Search("ABC")
MyScreen.WaitHostQuiet(1200)
TField = Trim(MyScreen.GetString(Srch.Bottom, Srch.Left, MyScreen.Cols - Srch.Right))
Catch ex As Exception
MsgBox(ex.ToString, MsgBoxStyle.Exclamation)
Exit Sub
End Try
End Sub
The first time I click the button the Srch Function returns the correct co-ordinates, the next time I click the button it doesn't find anything in the Srch, it's as if it's running past it too quickly.
If I put a breakpoint before, or at, the Srch line and then continue it works fine. I have played around with the WaitHostQuiet but have had not luck.
Any help would be GREATLY appreciated.
Cheers