LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting Property Of ActiveX Container

Hello,

 

I want to have scrollbars on a RichText ActiveX control that is dynamically created on UIR file of an application.

Unfortunately the property for scrollbars can only be set at 'design time' but not at runtime:

http://support.microsoft.com/kb/260744/en-us

 

There is also a possible solution in the article: Set the 'ambient property' of the ActiveX container and the control will be fooled to be in 'design mode' that should make it possible to display scrollbars

 

Is it possible to set the ActiveX Container Property with CVI? How can this be done?

 

Thanks

 

 

0 Kudos
Message 1 of 6
(4,113 Views)

I don't think you have access to the OnAmbient property in CVI - at least I do not see this in the generated wrappers. One workaround you can try to get the scrollbars is as follows:

1) Create a UIR file containing a RichText control with scrollbars (use the Property Sheets to set this).

2) In your code, load the panel in this UIR file and use the DuplicateCtrl function to duplicate the RichText control with scrollbar functionality to your program's UI panel.

 

0 Kudos
Message 2 of 6
(4,092 Views)

Thanks for your reply.

 

Unfortunately I am not able to open the property sheets of this ActiveX control (c:\winnt\system32\richtx32.ocx):

A Windows (XP) security warning pops up and afterwards I am asked to choose an application to start richtx32.ocx with.

 

Any idea?

0 Kudos
Message 3 of 6
(4,031 Views)

I meant that you should create a UIR file, insert an instance of the Microsoft Rich Text Box ActiveX control, and then edit the control. In the Edit Control dialog, you should access the property sheets and configure the scrollbars.

0 Kudos
Message 4 of 6
(4,005 Views)

I found out that it is necessary to have a "design-time license" in order to insert certain ActiveX controls to UIR files,

otherwise one get several error message ("ActiveX control is not licensed for this operation").

 

Following the instructions given by this URL: http://support.microsoft.com/kb/318597/en-us , I am now able to insert

the Richtext ActiveX control to an UIR file and even open the property sheets dialog and set the scrollbars.

 

As described in your first post, I duplicated the control (DuplicateCtrl) to my panels and now have scrollbars!

 

Thanks for your support.

0 Kudos
Message 5 of 6
(3,977 Views)

Hello MaWie,

 

I have the same license issue with Visual Basic controls.

Could you please describe how you solved the problem? With Method1 or Method2?

If you use Method2, could you please be so kind and provide me the "VB6 Controls" folder, as do not have the Visual Studio setup kit available?

 

Many thanks!

0 Kudos
Message 6 of 6
(3,262 Views)