Solved

D3 ActiveForm's in C++Builder

Posted on 1997-11-08
7
268 Views
Last Modified: 2010-04-04
Here's the problem:

I've made a few ActiveForm's in Delphi 3.  I've registered them and added them to the component palette in C++Builder.
I've even dragged these ActiveForm's onto a C++Builder form, compiled and executed the resulting program with no problems.   I have full intereaction with the ActiveForm from within my C++Builder app.  This all works fine.

Here's the catch...we don't want to use these ActiveForm's at design time.  We have to load them at run-time (because there will be many of them) and the user will decide which sub-module he/she wantsto work with.

So here's what I have done so far:

I took a TOleContainer and dropped it on my C++Builder form.  I then loaded the ActiveForm with the following statement:

 oc->CreateObject("OCXSubModule.Tier2SubModule", false);

This appears to work fine.  The ActiveForm is loaded into the TOleContainer.  Unfortuantely, you only get to look at the ActiveForm, you don't get to interact with it.

So, I'm beginning to wonder if TOleContainr is what I should be using.  This is my first foray into ActiveX and unfortunately my requirements are kind of unusual.

I need to know how to load in an ActiveForm at run-time given only the name of the OCX and the name of the class within (i.e. OCXSubModule.Tier2SubModule).

I need a solution in Delphi2 or C++Builder.  Delphi 2 and and C++Builder are very similar.  If you give me a D3 example, please make sure it will work as is in D2.

Thank you.  If need by, I can bump the points for this question up by about 100 more.
0
Comment
Question by:mheacock
  • 4
  • 3
7 Comments
 
LVL 3

Author Comment

by:mheacock
ID: 1349775
Adjusted points to 300
0
 
LVL 5

Expert Comment

by:JimBob091197
ID: 1349776
Hi again

Try "oc.DoVerb(ovShow);"  after "oc.CreateObject('...', false);".
I must be honest, I have only tried this in Delphi 3...  ;-)

JB
0
 
LVL 3

Author Comment

by:mheacock
ID: 1349777
I shall try it.
Any pointer or tip is better than no pointer or tip.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 3

Author Comment

by:mheacock
ID: 1349778
That worked like a charm.  Thanks.  Post as question for your A grade.
0
 
LVL 5

Expert Comment

by:JimBob091197
ID: 1349779
Hehe...  As this was a continuation of our previous discussion, I reckon I owe you this one for free!!  So, if u want to, reject this answer and delete the question...

JB
0
 
LVL 3

Author Comment

by:mheacock
ID: 1349780
I can't reject it now...answer it again.  I'll grade.

You can owe me one of a future question if I ever have one.

Thanks again for the offer and the question.
0
 
LVL 5

Accepted Solution

by:
JimBob091197 earned 300 total points
ID: 1349781
The answer is "oc.DoVerb(ovShow);".
JB
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now