Solved

Input from/to other program

Posted on 2004-04-27
5
113 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month8 days, 3 hours left to enroll

617 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