Solved

Running an Application Within a Window in Another Application

Posted on 2002-05-24
7
166 Views
Last Modified: 2010-05-02
OK this might sounds like a bit of a strange one but here goes, we've got an Off the shelf CRM package here and we've been designing tools with communicate with it to do various things (Using DDE and other stuff) Basically we're trying to design something along the lines of a desktop/shortcut bar for it. What I'm thinking (Not sure exactly how) but it would be nice to have our Desktop/Tool Suite running with the CRM package running within a window inside it, is this possible? Any thoughts???


Cheers
0
Comment
Question by:wolfjjj
7 Comments
 
LVL 43

Expert Comment

by:TimCottee
ID: 7031722
If you could get the hWnd of the window that it is running on then you could use SetParent api call to make it appear to be contained within a VB MDI form or a picture box even. The only problem would be handling the movement of that window within your container. You would probably have to trap the window messages and either discard them so that it cannot be moved or create scrollbars as necessary.

Certainly SetParent would work to place the window in an appropriate container such as a picture box on the form.
0
 
LVL 1

Author Comment

by:wolfjjj
ID: 7031728
Sounds pretty good as our application can be started first and have it actually start up the CRM software. I havn't used the SetParent API but assume it's pretty straightforward but how do I go about trapping the window messages and discarding them?

Cheers
0
 
LVL 1

Author Comment

by:wolfjjj
ID: 7031754
Sounds pretty good as our application can be started first and have it actually start up the CRM software. I havn't used the SetParent API but assume it's pretty straightforward but how do I go about trapping the window messages and discarding them?

Cheers
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 1

Expert Comment

by:mschech
ID: 7031833
SetWindowsHookEx with the WH_CBT parameter
will allow you to trap resizing type message sent to a window.
You'll have to look at each message and if it's one that
would move/resize the window, just don't pass it on.

Look up SetWindowsHookEx and CBTProc

0
 
LVL 8

Accepted Solution

by:
glass_cookie earned 100 total points
ID: 7033765
Hi!

Not very sure if this is what you're looking for, but here it is:

Download...
http://www.vb-helper.com/HowTo/startinm.zip
Description: Start a program inside another program's MDI form (3K)


Download...
http://www.vb-helper.com/HowTo/startin.zip
Description: Start a program inside another (3K)

That's it!

glass cookie : )
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7818496
Hi wolfjjj,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Split points between: TimCottee and glass_cookie

wolfjjj, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 

Expert Comment

by:SpideyMod
ID: 7910121
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange


TimCottee points added to:
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20463697.html
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

708 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now