CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2001
    Location
    Canada
    Posts
    78

    Running Apps inside VB apps

    Is it possible to run applications, for example MS Word, inside a VB application? Or how about running Word inside IE? I think it would be a cool thing to do, but I'm not sure if it is technically possible?


  2. #2
    Join Date
    Apr 2001
    Location
    Canada
    Posts
    78

    Re: Running Apps inside VB apps

    By the way, I don't mean just calling up an application but actually having the application embedded inside a VB application, that is, for example, Word would be inside an MDIForm or on a form somehow. Is that possible?


  3. #3
    Join Date
    Mar 1999
    Location
    Nepal
    Posts
    540

    Re: Running Apps inside VB apps

    You mean you don't want to just shell to another application. But you can grab the program's handle using a function such as
    hWindow = FindWindow(vbNullString, "Calculator")


    Once you have the handle of a window, you can do so many things with it. For example, set it always on top, and position it at a precise location over your form. Then it will appear as if it is on your form.

    One problem is what to do if the user tries to close, minimize or maximize the application.
    The solution is to remove the options altogether.

    If this idea appeals to you, then go on, we'll tell you how to remove the option, if you don't already know.


    Or you may use the OLE container control for some applications.


  4. #4
    Join Date
    Apr 2001
    Location
    Canada
    Posts
    78

    Re: Running Apps inside VB apps

    Yes, I don't just want to shell another application, but I guess like OLE, such like running Excel inside Word. For example, can I make an instance of Word as a child form? Meaning, Word would be contained inside the MDI form.

    By the way, I couldnt find the control you mentioned "OLE container control", I did see "Remote Shell OLE control module" listed in the components... is that the one you meant?

    Also, similar to this, would it be possible to do the same with Internet Explorer, meaning, an instance of Word or whatever application be embedded on a webpage, thus contained by IE.

    I really want to know if this is possible.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured