Solved

Running an Application Within a Window in Another Application

Posted on 2002-05-24
7
168 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Pull multiple cvs files into one access table 28 68
passing parameter in sql procedure 9 61
Prevent user closing word document opened with VB6 6 73
vbModal 12 51
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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.
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…

785 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