-
Apr 12th, 2013, 01:38 PM
#1
Thread Starter
Addicted Member
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.
-
Apr 13th, 2013, 02:23 AM
#2
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)
-
Apr 15th, 2013, 08:14 AM
#3
Thread Starter
Addicted Member
Re: First Time with Active X
Originally Posted by Bonnie West
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.
-
Apr 15th, 2013, 08:44 AM
#4
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)
-
Apr 15th, 2013, 09:23 AM
#5
Thread Starter
Addicted Member
Re: First Time with Active X
Originally Posted by Bonnie West
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
-
Apr 15th, 2013, 09:26 AM
#6
Re: First Time with Active X
Originally Posted by Crzyrio
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)
-
Apr 15th, 2013, 09:38 AM
#7
Thread Starter
Addicted Member
Re: First Time with Active X
Originally Posted by Bonnie West
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|