VB to other app

Jasper182

New member
Joined
Jan 6, 2006
Messages
1
Programming Experience
1-3
I'm working on a project where I would like to take output from my vb program and have it be inputted into text boxes from a program that I didn't create, and weren't made in vb at all. Is this doable? if so, what commands should I use to acheive this? Thanks in advance.
 
Yes you can do it, but it involves using Windows API functions. I suggest that you do some reading on calling API functions first, so you understand the mechanism you are using. Then you can look at exactly which API functions you need to use to do exactly what you want. It will involve at least three or four different functions. You'll need to get a handle to the actual control you want to send the text to and then actually send it. The place to start would be the the help/MSDN topics for the Declare keyword and the DllImportAttribute class. Using "Declare" is the VB6 way of declaring external methods but most people still use it in VB.NET. The DllImportAttribute class must be used in C# and is the more "correct" way to do it in VB.NET too. There are certain instances where you must use it in VB.NET as Declare has a few limitations.
 
Back
Top