|
-
Aug 29th, 2000, 10:46 AM
#1
Thread Starter
Hyperactive Member
Fairly easy questions if you guys ever used an ActiveX EXE.
I have a project that needs to call an external .exe (activex exe). My activeX exe is compiled, containing one class module and one form. From my main application, I want to show that form, or in other words, execute that activex exe. How can I do that? Is it a SHELL Command I must use or can't I just use MyForm.show (even tho it's in another project, in the same project group)
My 2nd question: Can I (MUST I) build the ACTIVEX EXE in the vbproject from which the it's gonna be called? Personnally, I would appreciate if I could keep the activex exe in my main project, as I will want to swap between them in the same VB window (easier for debugging)
Thanks for your help.
-
Aug 29th, 2000, 11:02 AM
#2
Fanatic Member
1. Your AcitveX.exe does not need to be shelled. You can add a refernce to the AX exe in your test project. You can then declare a variable of this type, and then get a new instance of the AX exe. You can then use this AX exe like any other object.
I am not really sure what you are talking about with the form. You will have to have a method in your AX exe, that loads it.
Code:
Dim myClassObject As New ClassName
myClassObject.ShowForm
2. Add a new project to your ActiveX exe project, or your existing test project. You now have a project group. Right click on this new project in the project explorer, and set it as the start up object. You can now debug away quite happily
Iain, thats with an i by the way!
-
Aug 29th, 2000, 11:06 AM
#3
Fanatic Member
This is a huge subject, which would take too long to answer here.......
If you have the samples frim VB installed, then look at the 'Coffee' folder and read the 'Aboutcof.txt' file. This should answer some of your question.
Also look at the MSDN on building an ActiveX.EXE application.
Good luck....
-
Aug 29th, 2000, 11:10 AM
#4
Thread Starter
Hyperactive Member
I`m having an error while trying to make a reference to my .exe.
In my main project, I'm trying to set a reference to my compiled activex exe (Update.exe) and it says:
Project 'Update.vbp' can not be referenced because it's project type is EXE.
Any idea?
-
Aug 29th, 2000, 11:22 AM
#5
Fanatic Member
Hmmm.
I have just tried it, and it works fine for me.
Compile your AX exe.
In your main project goto Project :> References.
Scroll through the list till you find the name of your AX exe.
Check the box next to your projects name and click OK.
Iain, thats with an i by the way!
-
Aug 29th, 2000, 12:05 PM
#6
Thread Starter
Hyperactive Member
Ok.. Quite a stupid error of mine. The refernece now seems to work but I find it sad that the ActiveX EXE project itself cannot be in the project group.
Whenever I tried adding the project back to the project group, I get the "Project 'Update.vbp' can not be referenced because it's project type is EXE." error message, the project is added alright but the main project looses the reference.
I am still hoping for a solution.
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
|