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
Solved

Running an Application Within a Window in Another Application

Posted on 2002-05-24
7
169 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 Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…

840 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