Click here to Skip to main content
15,074,987 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi all,

The VB6 version of the RichTextBox OCX control is less complete than the corresponding control in Visual Studio.
I started using Visual Studio for a very short time (I come from very different development environments) so I am not yet able to understand if the Visual Studio RichTextBox control can be “translated” into an OCX which would be useful for me to give its functionality to programs developed with other tools.
If what I ask is not feasible I will try with other solutions.
I hope for your patience and will try to grow.

Many thanks
Luigi

What I have tried:

I searched for similar problems on the Internet and in the Visual Studio documentation
Posted
Updated 11-Jul-21 3:43am
v2
Comments
Richard MacCutchan 28-Jun-21 6:49am
   
Visual Studio does not have a RichTextBox, that is a .NET Control. You need to look at the language documentation for whichever language you are using. But ActiveX is rarely supported these days so you may have difficulty updating your code.
Member 15254346 28-Jun-21 9:58am
   
Thank you Richard for your answer.
If I may then I would like to ask you for confirmation that, while previously I could "embed" an ActiveX in a language other than VB6, C ++, C # etc., and make that object become an integral part of an application, for reasons also related to safety, today this is no longer easily possible and that we can get close, but not too close, since we have to adopt quite different technical solutions.
My previous applications have been developed with a 4GL which allows to interface COM technologies.
Alternatively I could consider using REST-compliant web services.

Many thanks
Luigi
Richard MacCutchan 29-Jun-21 3:42am
   
Sorry, I do not know the answer. And it is not clear exactly what problem you are trying to solve.

PS if you wish to reply to someone then please use the Reply button above their comment.
Gerry Schmitz 28-Jun-21 11:41am
   
Whether it is feasible or not, there simply is no demand for a "rich edit ocx" for "programs developed with other tools" (and which in all probability don't need or have their own rich edit control).
Member 15254346 28-Jun-21 14:01pm
   
Hi Gerry,
I honestly do not agree that applications developed with other tools, and I repeat again that it is a 4GL that is not comparable with Visual Studio and similar tools, do not need portions developed with other languages.
The proof is in fact because I, like others, have used and have been using for several years, where necessary, controls from other environments.
As for the fact that a programming language can create its own OCX or something equivalent in the form of libraries, this also seems obvious to me.
This does not mean that every widget in this world is always available whatever the development environment you use or that it can be obtained with little effort.
Perhaps you work with tools with which, also thanks to the contribution of a large mass of technicians who enrich, often for free, environments such as Java, Javascript, Python, PHP and the like, you don't feel the need.
But computer science is not made up only of Java, Javascript, Python, PHP etc. so, without prejudice and with very honest recognition for the work of others, we use what we can find to overcome the limitations of our main work tool.
And if I have misinterpreted the meaning of your comment, I offer you my apologies and I wish you good work.
Luigi
Gerry Schmitz 28-Jun-21 21:58pm
   
I would be more inclined to call WordPad if I had a non-VS app that didn't have a native rich edit control and I needed to do "rich editing". You would be up and running faster versus creating an OCX from scratch (and no "security" issues).

https://www.techwalla.com/articles/wordpad-command-line-options
Member 15254346 28-Jun-21 17:35pm
   
Hi Dave,
Your answer clarifies some important things to me and prevents me from going through dead ends.
At this point I will make more realistic choices with respect to the scenarios I had designed by deepening some technical concepts that I will need for the realization of some prototypes to be gradually refined.
Many thanks
Luigi

1 solution

You keep saying "OCX", but that's a term that's falling out of use, along with ActiveX.

Yes, you can wrap, or expose, the functionality of a .NET control, through COM so other apps can still use the control. Though, to do so, you'd need to install the same version of the .NET Framework that you're using in your development on the client machine to use the control. So if you're developing a control, or using the RichTextBox control, from say .NET 4.7.2, you'd have to have the .NET Framework 4.72 or 4.8 installed on the client machine to use the control in your app.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900