Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.basic.visual.misc > #420

Re: Embedding a lable inside a Rich Text Box

From "Mayayana" <mayayana@invalid.nospam>
Newsgroups alt.comp.lang.vb, microsoft.public.vb.general.discussion, alt.comp.lang.visualbasic, comp.lang.basic.visual.misc
Subject Re: Embedding a lable inside a Rich Text Box
Date 2011-08-31 22:18 -0400
Organization A noiseless patient Spider
Message-ID <j3mptu$m8o$1@dont-email.me> (permalink)
References (1 earlier) <j361e4$54m$1@dont-email.me> <j36poq$38v$1@dont-email.me> <j37ihc$og7$1@dont-email.me> <j389qm$6pt$1@dont-email.me> <j3mkat$qpk$1@dont-email.me>

Cross-posted to 4 groups.

Show all headers | View raw


|   RichTextBox.TextRTF = "A" & Chr$(160) & "B"  'Non-breaking space
|   Debug.Print Asc(Mid(RichTextBox.Text, 2, 1))
|   RichTextBox.TextRTF = RichTextBox.TextRTF
|   Debug.Print Asc(Mid(RichTextBox.Text, 2, 1))
|

  Interesting. It turns a 160 into a 32. I didn't know there
were things like that built in. (Though I know IE is a disaster in
that regard. It does wacky things like turning <B> to <STRONG>
and adding an arbitrary DOCTYPE tag if one uses IE to save a
webpage.) But I wonder why you're using Chr 160. I use
that in HTML but wasn't aware of any difference when used in
other situations.

  You might also consider using a system RichEdit, if you're
not already doing so. The VB RTB wraps RichEdit v. 1, which
is "emulated" in recent Windows versions for compatibility. Later
versions provide more options, like multiple undo. (And, one
would like to think, they may have improved functionality in
general.)

  I have a version that I wrote using Paul Caton's self-
subclassing code (which he later rewrote to be very concise).

http://www.jsware.net/jsware/vbcode.php5

 I think vbAccelerator also has a version, and Eduardo Morcillo
may have a version. But it's not worth the trouble using
something like vbAccelertor's subclassing DLL. With self-
subclassing a userControl can handle it's own WindowProc
function, as well as the WindowProc function for an API-drawn
RichEdit window. And there are no crashing-in-the-IDE problems.
The result is something that's as easy to use as a VB RTB; one
can use any number of them without additional work; and the
resulting RT window can be v. 3 or later. (V. 3 is supported, I
think, on everything from Win98SE up.) 

Back to comp.lang.basic.visual.misc | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Embedding a lable inside a Rich Text Box Michael Cole <invalid@microsoft.com> - 2011-08-25 17:07 +1000
  Re: Embedding a lable inside a Rich Text Box "MikeD" <nobody@nowhere.edu> - 2011-08-25 13:40 -0400
    Re: Embedding a lable inside a Rich Text Box Michael Cole <invalid@microsoft.com> - 2011-08-26 10:36 +1000
      Re: Embedding a lable inside a Rich Text Box Michael Cole <invalid@microsoft.com> - 2011-08-26 17:39 +1000
        Re: Embedding a lable inside a Rich Text Box "mbyerley" <mbyerley@byerley.net> - 2011-08-26 07:46 -0400
        Re: Embedding a lable inside a Rich Text Box "Mayayana" <mayayana@invalid.nospam> - 2011-08-26 10:18 -0400
          Re: Embedding a lable inside a Rich Text Box Michael Cole <invalid@microsoft.com> - 2011-09-01 10:42 +1000
            Re: Embedding a lable inside a Rich Text Box "Mayayana" <mayayana@invalid.nospam> - 2011-08-31 22:18 -0400
              Re: Embedding a lable inside a Rich Text Box "Jim Mack" <no-uce-ube@mdxi.com> - 2011-09-01 08:36 -0400
              Re: Embedding a lable inside a Rich Text Box Michael Cole <invalid@microsoft.com> - 2011-09-02 10:22 +1000
        Re: Embedding a lable inside a Rich Text Box Raoul Watson <WatsonR@IntelligenCIA.com> - 2011-09-11 12:00 -0400

csiph-web