Results 1 to 7 of 7

Thread: First Time with Active X

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2013
    Posts
    177

    First Time with Active X

    Hey,

    What I am trying to do essentially seems very simple but I have never used Active X before and just have a few basic questions.

    I have a text/database file that will load a list of different objects for example: Dog, Cat, Mouse etc. There will be another program running at the same time on another screen that is like a viewer that will display images of what in the list. Now Say someone selects the cat , I want the controller to go into the other application and highlight the Cat(The program has a highlight function).

    First, is this possible? Or Im I using the wrong tools here.

    From my understanding Active x is ideal for this situation? Or would it be better to create a vb.net application that just takes control of the other?


    EDIT: I should also add that the program usually works with vb scripts and that is usually how we get things done but right now we need something a little more robust.

    I appreciate any help! Thanks
    Last edited by Crzyrio; Apr 12th, 2013 at 01:52 PM.

  2. #2
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    4,060

    Re: First Time with Active X

    On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
    Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2013
    Posts
    177

    Re: First Time with Active X

    Quote Originally Posted by Bonnie West View Post
    Sorry for the late reply.

    Thanks for the link, that looks like what I need to do. But my next question is how?

    I looked through the COM objects available through Project -> Add references and added the .tlb file that was associated with the program under the COM tab.

    after importing it I see some intellisense. which is good. I guess I have everything that is needed now and just need to figure out how to work with the program?

    EDIT: adding the COM reference only gave me access to the object. How do I use the syntax I use in vbs to connect to it?
    Last edited by Crzyrio; Apr 15th, 2013 at 08:35 AM.

  4. #4
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    4,060

    Re: First Time with Active X

    Which version of VB are you using to program your app? Have you checked out the other IPC mechanisms listed in that article? This VB6 CodeBank submission demonstrates how to use Anonymous pipes for IPC. See also Sharing Objects via an ActiveX EXE and MMapper, Memory Mapped File Demo.
    Last edited by Bonnie West; Apr 15th, 2013 at 09:21 AM. Reason: Added more suggestions
    On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
    Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jan 2013
    Posts
    177

    Re: First Time with Active X

    Quote Originally Posted by Bonnie West View Post
    Which version of VB are you using to program your app? Have you checked out the other IPC mechanisms listed in that article? This VB6 CodeBank submission demonstrates how to use Anonymous pipes for IPC. See also Sharing Objects via an ActiveX EXE.
    I am working is VS 2010/vb.net.

    What I have done right now is add reference to 'Windows Script Host Model' and I am using some of the vb script I had. With that I am able to interact with the program. I also set Option Explicit On and Option Strict Off

  6. #6
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    4,060

    Re: First Time with Active X

    Quote Originally Posted by Crzyrio View Post
    I am working is VS 2010/vb.net.
    Sorry, I'm not familiar with VB.Net. However, I'll ask the mods to move your thread to the VB.Net forum where you'll likely get more responses.
    On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
    Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Jan 2013
    Posts
    177

    Re: First Time with Active X

    Quote Originally Posted by Bonnie West View Post
    Sorry, I'm not familiar with VB.Net. However, I'll ask the mods to move your thread to the VB.Net forum where you'll likely get more responses.
    Thanks! I initially thought I would need an Active X controller hence I posted here, but since then I am thinking it is better to go this way.

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