Solved

Input from/to other program

Posted on 2004-04-27
5
110 Views
Last Modified: 2010-05-02
Hi Experts,

I need to create some interaction between two programs:
Program-A that is started by the user
Program-B that is started by an event of program-A

Every character that is typed in a textbox in Program-B has to be send to Program-A.
If the user clicks on the form of Program-A program-B has to be hide or unload.
Till now it was easy and good working, now I have to build some more programs,

So there will be several Programs-A that will use program-B
How to figureout to what Program-A the information has to be send,
and what program-A should hide Program-B




0
Comment
Question by:theo kouwenhoven
5 Comments
 
LVL 11

Expert Comment

by:bingie
ID: 10932489
Check out this tutorial for info on sending to other applications.

http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=42126&lngWId=1
0
 
LVL 16

Author Comment

by:theo kouwenhoven
ID: 10934068
Hi Bingie,

Thanks for the quick response, The example solves my problem almost!!!

the sample from the link is using Notepad and that is the problem, I don't know what application has started my
program, so I need the name of the previous active application or give the name of that aplication with a parameter to
the program while starting it but How ???

Private Sub Command1_Click()

Dim lNotepadHwnd As Long
Dim lNotepadEdit As Long
Dim sCaption As String
   
    lNotepadHwnd = FindWindow("Notepad", vbNullString)
    lNotepadEdit = FindWindowEx(lNotepadHwnd, 0&, "Edit", vbNullString)

    sCaption = InputBox("What do you want to say?")
   
    SendMessageSTRING lNotepadEdit, WM_SETTEXT, 256, sCaption

End Sub
0
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
ID: 11297167
Closed, 100 points refunded.
Netminder
Site Admin
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question