Click here to Skip to main content
15,917,328 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to build an apps which use Richtx32.ocx where I have a text box displaying text with various formats like bold, italic etc., my question is how do I embedded the richtext function when I compile my apps so that it can be install on windows 7 as well as windows 10, is there any way I can build a richtx32.ocx like function and put it as a module so that my apps can go in one piece, I am using VB6.

Would be very grateful if anyone can give me a suggestion.

Thanks,

Zela

What I have tried:

Need to embed richtxt32.ocx like function
Posted
Updated 6-Sep-21 22:04pm
Comments
Richard MacCutchan 5-Sep-21 13:32pm    
VB6 has been dead for more than twenty years. You should move up to VB.NET and its components.

1 solution

Your question is not entirely clear but you appear to be attempting to use Richtx32.ocx with VB6 on both Windows 7 and Windows 10 and are having (undisclosed) problems doing that.

Firstly, you don't "embed" any "function" when you compile your application, any controls or other components used must be included in the installation package or already be installed on the target machine. Historically (as in 20+ years ago) all of the components were included with Windows. That is not necessarily the case these days.

Make sure you have the latest version of Service Pack 6 for Visual Basic installed - see Download Microsoft Visual Basic 6.0 Service Pack 6 Security Rollup Update from Official Microsoft Download Center[^] - all the other sources I have used in the past have now been discontinued... because VB6 (aka "Classic VB") is no longer supported.

From memory you can compile on Windows 7 and run on Windows 10 but not the other way around - I say from memory, it's been 10 years since I did any of this stuff in anger. If you get errors about missing components you can use Sysinternals Utilities - Windows Sysinternals | Microsoft Docs[^] to work out what is missing. Remember to ensure that all OCX / DLL are registered under SysWOW64

Which leads me to the correct solution to your problem ... Do not build new applications in VB6. It is defunct, dead, no longer supported, shuffled off this mortal coil.

Use any existing VB6 applications as a "spec" or "template" or "proof of concept" and convert them to a more modern language e.g. VB.NET or C#.

During that conversion make sure that you replace the likes of Richtx32.ocx with the built-in UI components available in .NET - do not just do a like-for-like swap. You will gain longevity for your application and far fewer headaches.
 
Share this answer
 

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