Embedding ActiveX Controls in the Microsoft RichTextBox Control

Embedding ActiveX Controls in the Microsoft RichTextBox Control

Post by Joseph M. » Wed, 12 May 2004 06:52:06


Good afternoon,

I am trying to embed a couple of custom controls into a RichTextBox
control. My purpose is to insert metadata inside of the RichTextBox
that can be extracted back out at a later time.

As a test, I made a very simple ActiveX Control for a proof of concept.
The control is a single TextBox control placed onto a new Usercontrol.
Once compiled, I add a control instance to the RichTextBox with:

rtfSample.OleObjects.Add , , , "myobject.myclass"

I can add the control just fine. Initially, the control starts up
activated for in-place editing. Once I deselect the object, I can not
activate the control again. Even with a double click event, the ActiveX
Control that I have embedded only offers up resize handles and does not
go back into an in-place editing mode.

Is the only chance to edit this object really only at the time of
insertion? If so, I am afraid I am going to have to look for another
solution.

Thank you in advance,

Joseph Ferris
XXXX@XXXXX.COM
 
 
 

Embedding ActiveX Controls in the Microsoft RichTextBox Control

Post by dnage » Sun, 16 May 2004 11:43:30

I believe it's more likely that theres an error or some invalid runtime
code placed somewhere thats
causing the control to crap, thus the reason it's not responding... Are
you touching any of the
ambient or extender properties?

D?

 
 
 

Embedding ActiveX Controls in the Microsoft RichTextBox Control

Post by Joseph M. » Wed, 19 May 2004 05:09:04


No, I am not. I made the sample control as basic as possible to try to
make sure that my problem was not in the control. On a different
machine, however, it is working properly. This development machine that
I am on is on the block to be rebuilt soon, and it might be the source
of my problems for one reason or another.

I am going to try testing it on a couple of more machines to make sure
that what I encountered was an isolated incident.

Thanks!

--Joseph