Results 1 to 6 of 6

Thread: Put app inside of MDI window.

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2005
    Posts
    192

    Put app inside of MDI window.

    Greetings Fellas & Woka.

    I am wondering, if I can simply add a form to a MDI form using an api. I have an EXE and I want it to apear inside of it. Notice, I didn't create this application. Another method for those c++ guys would be to create a dll and have it open the program inside. How the program works is it creates a "start bar" kinda thing where you can see all the modules for the program. you must have a dll to do that. But I know nada about c++, so vb was the route. In c++ I just want the program to start, and load itself into the mdi frame.

    I don't know of the api call to use, or it's useage for the vb program. So if you could help me that would be great. I know I would have to use FindWindow to find the mdi form, but then how do I get my app inside of it? That's the question.

    After that it is easy to do. I am going to have another program find another window inside of the mdi form (I have code for this)... and then grab it's focus and send it commands with send keys .... So this is a very simple app. Just any help appreciated

    Thanks everyone!

  2. #2
    Fanatic Member
    Join Date
    Mar 2005
    Posts
    537

    Re: Put app inside of MDI window.

    Use the SetParent API to make the VB IDE stay in an MDI form.

    -Sir Loin

  3. #3
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: Put app inside of MDI window.

    SetParent will work (sort of)... However you should use FindWindow to get the handle of the MDI form and then use FindWindowEx to find the handle of the MDIClient area of that form and then use SetParent.

    However this will be ugly, just try to move the form afterwards or maximize it and you'll see what I mean.

    As you describe it it seems like this application has an add-in feature in which you can create windows inside of it. Using SetParent will put your window inside the foreign window but the foreign application will not know about this window so the redrawing will probably be off as well.

  4. #4
    Fanatic Member
    Join Date
    Mar 2005
    Posts
    537

    Re: Put app inside of MDI window.

    I noticed that using SetParent, and like Call SetParent (VB6&,Me.Hwnd) didn't work too well. I couldn't minimize VB.

    -Sir Loin

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jun 2005
    Posts
    192

    Re: Put app inside of MDI window.

    The application is REAL simple. Just moving around is sufficient, there will be no resizing. The application mimics the rest of the look of the program to create a uniform look. Basically I took a background done in photoshop and created everything that was needed, frames, backdrop, etc. Then applied buttons & textboxes, colored as needed. Then added transparent picture boxes which would do various tasks, so like on the top bar it would move on click events. & On clicking on the X portion of the backdrop, triggers a unload Me command.

    Thanks for the replies all!

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Jun 2005
    Posts
    192

    Re: Put app inside of MDI window.

    Again however, any help with the c++ stuff? I'm not real savy on c++ at all. Surely there are those that are crossover programmers.

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