Solved

Running an Application Within a Window in Another Application

Posted on 2002-05-24
7
167 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
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…
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…
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…

930 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

12 Experts available now in Live!

Get 1:1 Help Now