Results 1 to 6 of 6

Thread: Apps using RICHTX32.OCX

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2016
    Posts
    4

    Question Apps using RICHTX32.OCX

    I have this app which use RICHTX32.OCX, when I try to run my program it gives error when the system does not have richtx32.ocx file, I have to put the .ocx manualy and register using regsvr32 command when I have to run the apps on different system. Is there any way I can put the richtx32.ocx like function in the main module so that I can compile the whole software and install it in other system, or a free code like richtx32.ocx so that I can embed in my software.

    Zela

  2. #2
    Fanatic Member
    Join Date
    Jan 2013
    Posts
    759

    Re: Apps using RICHTX32.OCX

    Is there any way I can put the richtx32.ocx like function in the main module so that I can compile the whole software ...
    Classic Answer:

    No, because Windows Dll's aren't meant to work that way.
    We don't ship humongous, statically-linked, all-in-one, executables.

    ... or a free code like richtx32.ocx so that I can embed in my software.
    Again, no. You;d still ahve to ship whatever that was with your Application as well.

    ... and install it in other system ...
    And you've answered your own question.

    You need to install your application, along with its dependencies, on each target machine and, for that, you'll need to create an Installer. That installer will take the executable and all the other things it needs and make sure they wind up in the right places and properly registered, etc. on the target machine.

    VB ships with the Package and Deployment Wizard, which is [just about] better than nothing, but I'm sure others around here will recommend [far] better tools.


    These days, you can use Manifests to remove the need for registering [many] components on the target machine, but you still need to get all the files onto the target machine somehow and an Installer is the best way to do that.

    Regards, Phill W.

  3. #3
    The Idiot
    Join Date
    Dec 2014
    Posts
    2,721

    Re: Apps using RICHTX32.OCX

    that is why u should not depend on any .OCX if you want to be able to release a program that can be executed directly without any setup.
    so, if you want to avoid a setup, you need to learn and understand what this RICHTX32.OCX is doing and create it yourself.

  4. #4
    Addicted Member
    Join Date
    Aug 2013
    Posts
    236

    Re: Apps using RICHTX32.OCX

    Quote Originally Posted by Phill.W View Post
    VB ships with the Package and Deployment Wizard, which is [just about] better than nothing, but I'm sure others around here will recommend [far] better tools.
    Inno is the one I've been using for yonks, it's very widely used as far as I can tell.

  5. #5
    Fanatic Member
    Join Date
    Feb 2015
    Posts
    1,023

    Re: Apps using RICHTX32.OCX

    Another approach is to use Krool's controls (Krool posts in this forum).
    https://www.vbforums.com/showthread....mmon-controls)

    These replace the VB6 common controls (including RICHTX32.OCX) without needing OCXs. The code is included in your app (it still calls Windows DLLs but these would normally be on any PC).

    The controls have compatible properties so it is easy to replace the VB6 OCXs.

    (There is an OCX version of Krool's controls but this would need you to distribute the OCXs - so don't use that version.).

    The download is in the format of a demo app so you can see the controls working.

  6. #6
    PowerPoster Elroy's Avatar
    Join Date
    Jun 2014
    Location
    Near Nashville TN
    Posts
    9,852

    Re: Apps using RICHTX32.OCX

    There are two ways to do what you're trying to do: 1) Use the SxS (side-by-side) technology that's available to us in VB6, or 2) Include Krool's source-code for the RichTextbox in your source code.

    For the first way, here's a link to a post in a SxS tutorial I wrote. It has all the manifest information in it for including the RichTx32.ocx in your project without any need for registering it. If you're not familiar with the SxS technology, read the thread from the top.

    For the second way, here's a link to a CodeBank post that has Krool's RichTextbox peeled out of his larger project, allowing you to just include that one control. Because he did it all with API calls, there's no need to register anything. Please read the OP (#1 post) in that thread though, specifically about the OLEGuids.tlb typelib.

    With either of these methods, you can make your project (with a RichTextbox in it) completely portable (i.e., no need for installation, just run executable).

    Maybe that'll help you.
    Last edited by Elroy; Nov 23rd, 2021 at 10:04 AM.
    Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width