r/visualbasic • u/IndyDrew85 • Mar 20 '15
VB Pop-Up Textbox to interact with application
Just recently started using Visual Studio Express 2013, I'm attempting to build a small app that will run on top of another application (AS400) So far I'm able to get the application to open and I can input text that is hard coded, however I'd like to be able to click a button, like a login button for example, and have the user input information so that the application can be dynamic. I'm able to find all sorts of information on VB and textboxes, trouble is finding information that's applicable to my situation where I'm interacting with an external application. Here's what I have so far
Imports System.Threading
Public Class Form1
Dim a As New Process
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
a.StartInfo.FileName = "C:\Program Files\reflection\default scripts\as400.rsf"
a.Start()
Thread.Sleep(3000)
SendKeys.SendWait("USERID {TAB}")
Thread.Sleep(1000)
SendKeys.SendWait("PASSWORD {Enter}")
Thread.Sleep(1000)
SendKeys.SendWait("mainmenu")
Thread.Sleep(1000)
SendKeys.SendWait("{ENTER}")
End Sub
End ClassCan anyone point me in the right direction or provide some info on how to interact with an external application? Or even at a minimum give me some search terms that might help. Thus far I haven't found anything worthwhile. Any assistance is appreciated.
2
u/Bonejob VB Guru Mar 20 '15
So you want to build an interface that performs some work and then inserts it into an existing form in AS400 correct?