Results 1 to 12 of 12

Thread: [RESOLVED] RichTextBox Has No Properties or Events!

  1. #1

    Thread Starter
    PowerPoster CDRIVE's Avatar
    Join Date
    Jul 2007
    Posts
    2,620

    Resolved [RESOLVED] RichTextBox Has No Properties or Events!

    I have no idea when this happened but as the title states my RichTextBox is DOA! Admittedly it's been a long time since I've used that control, so I don't know if it happened back when I migrated from XP to W7/64b or not. I doubt it though.

    I located the RICHTX32.OCX in C:\Windows\SysWOW64 and ran regsvr32 just in case it wasn't registered. When that didn't help I copied it to the System32 folder and ran regsvr32 again. Still nada!

    The only Design Time property listed is "Custom". I can't even rename the RTB.

    Anyone know what's happening here?

    Thanks,
    Chris
    <--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
    If topic has been resolved, please pull down the Thread Tools & mark it Resolved.


    Is VB consuming your life, and is that a bad thing??

  2. #2
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: RichTextBox Has No Properties or Events!

    Working fine here (Windows 10 1709).

  3. #3

    Thread Starter
    PowerPoster CDRIVE's Avatar
    Join Date
    Jul 2007
    Posts
    2,620

    Re: RichTextBox Has No Properties or Events!

    I wonder if a windows update broke it? I'm clueless as to what to try next.
    <--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
    If topic has been resolved, please pull down the Thread Tools & mark it Resolved.


    Is VB consuming your life, and is that a bad thing??

  4. #4
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: RichTextBox Has No Properties or Events!

    I don't think so, that doesn't seem like the sort of thing a patch would do.

    I'm surprised your RTBs didn't raise an error dialog and then get replaced by PictureBoxes if the OCX wasn't registered properly. Is there perhaps a corrupted richtx32.oca file next to richtx32.ocx? It is always safe to remove it, VB6 will just recreate it from the typelib within richtx32.ocx.

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

    Re: RichTextBox Has No Properties or Events!

    I use the RTB all over in my main project, and I've been running Win10-64 for a few months now, letting all updates come through, and I haven't seen any problem. Also, I just started a new project, added the RTB, threw an RTB and CommandButton on the Form1, and then added this code:

    Code:
    
    Option Explicit
    
    Private Sub Command1_Click()
        RichTextBox1.BackColor = &HFF0000
    End Sub
    
    Private Sub RichTextBox1_Change()
        Debug.Print "changed"
    End Sub
    
    I type in the RTB (after executing in the IDE) and my Immediate window starts scrolling "changed" messages. And I click Command1 and the background turns blue.

    So all seems well here. Sorry you're having problems, CDRIVE. I hope you get them sorted.

    All The Best,
    Elroy
    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.

  6. #6
    Fanatic Member Spooman's Avatar
    Join Date
    Mar 2017
    Posts
    868

    Re: RichTextBox Has No Properties or Events!

    Chris
    I located the RICHTX32.OCX in C:\Windows\SysWOW64
    I updated from XP to Win10 about 6 months ago, with no issues.
    FWIW, I too located the RICHTX32.OCX in C:\Windows\SysWOW64.

    Is the issue encountered when
    • you try to run an old app
    • create a new project
    • both


    Spoo

  7. #7

    Thread Starter
    PowerPoster CDRIVE's Avatar
    Join Date
    Jul 2007
    Posts
    2,620

    Re: RichTextBox Has No Properties or Events!

    Sir Dilettante thank you for the reply and the richtx.oca file tip. Sometimes I think I'm loosing my mind. I could have sworn that I saw it in the sysWOW32 folder yesterday. Today I searched my entire system and couldn't find it. When exactly does VB create it?
    https://fileinfo.com/extension/oca
    I'm afraid that I was remiss in not posting the error message that I'd get when executing a simple line of code like..
    Code:
    RichTextBox1.Left = 200
    In fact just about any property reference kicked back an error like "This is not a registered class". I can't tell you exactly because I finally fixed the problem. What I did was replace the richtx32.ocx with a copy of the one on my VB disk. All is well now.

    I want thank you Elroy and Spoo for the assistance.

    Cheers!
    Chris

    Edit: Spoo... Yes all the above new and old.
    <--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
    If topic has been resolved, please pull down the Thread Tools & mark it Resolved.


    Is VB consuming your life, and is that a bad thing??

  8. #8
    Frenzied Member
    Join Date
    Jun 2015
    Posts
    1,057

    Re: RichTextBox Has No Properties or Events!

    [...]
    Last edited by dz32; Apr 26th, 2019 at 11:27 AM.

  9. #9
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: RichTextBox Has No Properties or Events!

    As far as I know VB6 creates an OCA file when your Project uses an OCX and there isn't already a matching OCA file. This is supposed to be a time-saver when you open future Projects using the same OCX. This is also one more reason why the IDE should always be run elevated.

  10. #10

    Thread Starter
    PowerPoster CDRIVE's Avatar
    Join Date
    Jul 2007
    Posts
    2,620

    Re: RichTextBox Has No Properties or Events!

    Quote Originally Posted by dilettante View Post
    As far as I know VB6 creates an OCA file when your Project uses an OCX and there isn't already a matching OCA file. This is supposed to be a time-saver when you open future Projects using the same OCX. This is also one more reason why the IDE should always be run elevated.
    Thank you for the additional .oca information but I think I need further clarification. Is that when the .ocx is placed in the tool box, inserted on the Form, at run time, or when the project or form is saved? Also if VB isn't elevated does it fail to create the .oca?

    Cheers,
    Chris
    <--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
    If topic has been resolved, please pull down the Thread Tools & mark it Resolved.


    Is VB consuming your life, and is that a bad thing??

  11. #11
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: RichTextBox Has No Properties or Events!

    It probably occurs when you add an OCX to the toolbox.

    If VB6.EXE is not running elevated then access to the OCX's directory may be disallowed, especially for somewhere such as System32 or Program Files\common files.

    What happens then depends on whether or not you have added a Vista-aware manifest to VB6.EXE.
    If so, then VB6.EXE will get a security violation (Error 70 Permission denied or something like that). If not, then the OCA file will be created in a virtualized folder instead.

  12. #12

    Thread Starter
    PowerPoster CDRIVE's Avatar
    Join Date
    Jul 2007
    Posts
    2,620

    Re: RichTextBox Has No Properties or Events!

    Dilettante, thank you for all your help. It's always greatly appreciated.

    Best regards,
    Chris
    <--- Did someone help you? Please rate their post. The little green squares make us feel really smart!
    If topic has been resolved, please pull down the Thread Tools & mark it Resolved.


    Is VB consuming your life, and is that a bad thing??

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