Announcement

Collapse
No announcement yet.

Please help: Need sample code in VB to open external app and...

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Please help: Need sample code in VB to open external app and...

    I started after many years of not coding and decided that VB would be the easiest for me to get back into the game. I used to program turbo pascal, but those days are long gone.

    So I started a simple form with a button that uses the diagnostic.process.start to open an new process, in my case iguidance. That works just fine but I have no control over the size and the location of the IG application.

    Could someone please post some sample code that shows how to open the application, resize and locate it and possibly even show how to get rid of borders?

    Sorry for such newbie questions as I am sure most around here that consider themselfs beginners even know more than I do, but I just need a little help to get off the ground.

    Also, if there is good websites that give outstanding turorials with sample code to get going in other areas that would be great as well.

    Thanks alot in advance.

  • #2
    I will assume your are talking about vb.net. Personally I use the express the editions.

    I will also assume, based on what you say you are trying to do, that you are working on a frontend. If these are wrong please let me know.

    As a direct answer to your questions I think this is what your looking for:
    Google is your friend.


    CarPuter
    ----------------------------
    Planning....[||||||||||]60%
    Parts.......[||||||||||]20%
    Construction[||||||||||]0%
    Software....[||||||||||]0%

    Comment


    • #3
      Thanks Theglord

      I managed to use that methode that is explained in the link you provided and also I managed to use the Function SetWindowPos to place the applications where I would like them. It took me a while to figure out a good way to get the correct window handle as some apps use splash screens and it would place that instead of the actual app.

      I still have not figured out how to place an app insde a from of my own so I can hide the borders of the existing app. The function that lets me set the external app as a child of my form always seems to create some sort of exception.

      Oh well.

      I am playing around with multimedia content like DVD, mp3, MPG and so on.

      Comment


      • #4
        You may want to look at http://www.codeproject.com/vb/interop/VB6formsinNET.asp

        You need "your main form" to be an mdi container , and then you can set the external app as a "child" wich will display itself in the MDI container area.

        Hope this helps.

        [EDIT]
        If your looking in to emeding media player, quicktime video, etc.. you can use add thier veiw panels as a control (much like a panel) on your form with out embeding the entire app and still be able to control the audio/video playback. This will also save resources as it wont have to load the entire app to play the media.
        [/EDIT]


        CarPuter
        ----------------------------
        Planning....[||||||||||]60%
        Parts.......[||||||||||]20%
        Construction[||||||||||]0%
        Software....[||||||||||]0%

        Comment

        Working...
        X