Results 1 to 6 of 6

Thread: [RESOLVED] After text colorize in RTB, it returns to black after form minimize

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2009
    Location
    Mn-USA
    Posts
    124

    Resolved [RESOLVED] After text colorize in RTB, it returns to black after form minimize

    I colorize certain text in a Rich Text Box in my form load, and also when I do a Save after user edits the data. But when the form is minimized and then a form.activate event occurs, the colorization is gone and the text is black.
    Is this normal behavior? The text is black at entry to the activate event.
    There is a computer disease that anybody who works with computers knows about. It's a very serious disease and it interferes completely with the work. The trouble with computers is that you 'play' with them!
    Richard P. Feynman

  2. #2
    Frenzied Member
    Join Date
    Dec 2008
    Location
    Melbourne Australia
    Posts
    1,487

    Re: After text colorize in RTB, it returns to black after form minimize

    Make a copy.
    Trim away as much as you like, but leaving enough to demonstrate this problem.
    Then attach the project.
    That will give us something we can get our teeth into

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 2009
    Location
    Mn-USA
    Posts
    124

    Re: After text colorize in RTB, it returns to black after form minimize

    Ok-will try to that. Interesting in that sometimes form activate triggers and sometimes not. It doesn't seem to be predictable.
    There is a computer disease that anybody who works with computers knows about. It's a very serious disease and it interferes completely with the work. The trouble with computers is that you 'play' with them!
    Richard P. Feynman

  4. #4
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    5,152

    Re: After text colorize in RTB, it returns to black after form minimize

    Quote Originally Posted by VB-only View Post
    Ok-will try to that. Interesting in that sometimes form activate triggers and sometimes not. It doesn't seem to be predictable.
    Form_Activate event is raised when a different form is focused within our application only. If the current active form of our application is focused from external application then Form_Activate is not raised.

    But if a different form of our application is focused from external application then Form_Activate is raised because current active form within our application is changed.

    cheers,
    </wqw>

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jan 2009
    Location
    Mn-USA
    Posts
    124

    Re: After text colorize in RTB, it returns to black after form minimize

    After doing some more reading here,
    https://www.freetutes.com/learn-vb6-...esson6/p4.html
    it refers to the Autoredraw property and whether true or not during form activate. I set Autoredraw to true and the form loads properly now.
    Live and learn I guess! Thanks for the valuable comments.
    There is a computer disease that anybody who works with computers knows about. It's a very serious disease and it interferes completely with the work. The trouble with computers is that you 'play' with them!
    Richard P. Feynman

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Jan 2009
    Location
    Mn-USA
    Posts
    124

    Re: [RESOLVED] After text colorize in RTB, it returns to black after form minimize

    More info.
    Form minimize invokes form resize, twice!. I was doing some strange stuff with the font sizes in resize and that was the crux of my problem.
    The resize event was coded twenty years ago and looking at it today makes me think of looking at a four year olds art work.
    There is a computer disease that anybody who works with computers knows about. It's a very serious disease and it interferes completely with the work. The trouble with computers is that you 'play' with them!
    Richard P. Feynman

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