Assign object to running windows program

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • AP

    #1

    Assign object to running windows program

    Hello, I am having trouble trying to assign an object to a running program
    in windows in VB.NET
    A COM component class with the same name as the windows program is avaliable
    to use
    in VB.NET.
    The component doesnt have an actual icon that you can drag on to a form, you
    can only access the class.
    Is there anyway to create an instance of this class and assign it to a
    running instance within a running windows program?
    Do I need to FindWindow() API call to assign the window to my object?
    Or do I need to do something completly different like create a COM program.
    Hope this is not too confusing.

    Hope someone can help

    --
    AP



  • Cor Ligthert [MVP]

    #2
    Re: Assign object to running windows program

    AP,
    [color=blue][color=green]
    >>Hope this is not too confusing.[/color][/color]

    I assume that because this are mostly questions answered by Herfried and
    Arming.

    I assume that the only thing you have to do is place a reference with

    Project-> add reference -> browse -> add -> Ok

    Imports .......

    I hope this helps, although this is not really my area that I like to give
    answer for.

    Cor


    Comment

    • Cor Ligthert [MVP]

      #3
      Re: Assign object to running windows program

      AP,
      [color=blue][color=green]
      >>Hope this is not too confusing.[/color][/color]

      I assume that because this are mostly questions answered by Herfried and
      Arming.

      I assume that the only thing you have to do is place a reference with

      Project-> add reference -> browse -> add -> Ok

      Imports .......

      I hope this helps, although this is not really my area that I like to give
      answer for.

      Cor


      Comment

      • AP

        #4
        Re: Assign object to running windows program


        "Cor Ligthert [MVP]" <notmyfirstname @planet.nl> wrote in message
        news:ekW4eWStFH A.3628@TK2MSFTN GP14.phx.gbl...[color=blue]
        > AP,
        >[color=green][color=darkred]
        >>>Hope this is not too confusing.[/color][/color]
        >
        > I assume that because this are mostly questions answered by Herfried and
        > Arming.
        >
        > I assume that the only thing you have to do is place a reference with
        >
        > Project-> add reference -> browse -> add -> Ok
        >
        > Imports .......
        >
        > I hope this helps, although this is not really my area that I like to give
        > answer for.
        >
        > Cor[/color]

        Hi, Thanks for replying. I have done what you said but I still cant get it
        to work
        I have tried the following

        Dim Game As Object
        Game = CreateObject("G ameLib")

        I have added a reference for GameLib but it will not assign the object, it
        just comes up with an exception all the time.

        Hope you can help

        --
        AP



        Comment

        • AP

          #5
          Re: Assign object to running windows program


          "Cor Ligthert [MVP]" <notmyfirstname @planet.nl> wrote in message
          news:ekW4eWStFH A.3628@TK2MSFTN GP14.phx.gbl...[color=blue]
          > AP,
          >[color=green][color=darkred]
          >>>Hope this is not too confusing.[/color][/color]
          >
          > I assume that because this are mostly questions answered by Herfried and
          > Arming.
          >
          > I assume that the only thing you have to do is place a reference with
          >
          > Project-> add reference -> browse -> add -> Ok
          >
          > Imports .......
          >
          > I hope this helps, although this is not really my area that I like to give
          > answer for.
          >
          > Cor[/color]

          Hi, Thanks for replying. I have done what you said but I still cant get it
          to work
          I have tried the following

          Dim Game As Object
          Game = CreateObject("G ameLib")

          I have added a reference for GameLib but it will not assign the object, it
          just comes up with an exception all the time.

          Hope you can help

          --
          AP



          Comment

          • Cor Ligthert [MVP]

            #6
            Re: Assign object to running windows program

            AP,

            As I said this is not my teritorium, however did you use the object browser
            after that you had set it in your resources to see what public members it
            has?

            Cor


            Comment

            • Cor Ligthert [MVP]

              #7
              Re: Assign object to running windows program

              AP,

              As I said this is not my teritorium, however did you use the object browser
              after that you had set it in your resources to see what public members it
              has?

              Cor


              Comment

              Working...