Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Input from/to other program

Posted on 2004-04-27
5
Medium Priority
?
115 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

721 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