Re: Textbox vs. RichTextbox + Linebreaks?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Ben R. wrote:
Just to further clarify, if I use:

TextBox1.Text = "test" & ControlChars.NewLine & "string"

in the form_load event, it works properly. But if I use:

Dim x As New com.ibm.machine.Service
TextBox1.Text = x.HelloWorld()

and have the helloworld method defined remotely as:

return "test" & ControlChars.NewLine & "string"

This causes the textbox1 to look like:

Hello World(BOX)string

However, if I do:
Dim x As New com.domain.machine.Service
RichTextBox1.Text = x.HelloWorld()

It looks correct with a line break.


OK, so make a little helper function that takes an array of Char and returns the ToString of the numeric values of the elements, then compare its output when passed the test string and x.HelloWorld(). Maybe the newline is different on the remote system, maybe it's getting mistranslated on the wire.

--
Larry Lard
larrylard@xxxxxxxxxxxxxx
The address is real, but unread - please reply to the group
For VB and C# questions - tell us which version
.



Relevant Pages

  • Re: Cant connect to remote computer.
    ... the Local Administrator account on the remote system. ... I first do a WMI check to make sure I can connect remotely, ... MsgBox myMsg, VBCritical, "WMI Connection Error!" ... Dim objWMIService ...
    (microsoft.public.scripting.wsh)
  • RE: Hi All, need urgent help please.
    ... Are you comparing all the books against a 'master' copy or each book against ... Is there a set range of cells in each book that you want to check or is it ... The code below will compare specific sheets and list the results. ... Dim wksSheet1 As Worksheet ...
    (microsoft.public.excel.programming)
  • Re: checkboxes not updating and how do I move to next record?
    ... What I'm trying to do is compare the name fields of two tables. ... check off both boxes. ... I need the onEPLSDb checkbox checked off and the ... Dim RecordScrubbed As Boolean ...
    (microsoft.public.access.formscoding)
  • Re: Duplicate checking...
    ... Dim rs As DAO.Recordset ... Dim fld As DAO.Field ... Dim blnSameData As Boolean ... and just compare to those variables in the form's BeforeUpdate ...
    (microsoft.public.access.forms)
  • Re: <> then hide
    ... Sub CompareRangeDemo() ... Dim oldupdate1 As Range, oldCell As Range ... I ran into one problem, if a cell has 256+ characters, it spits an error 13 mismatch. ... To compare, I'd really like to compare the group as a whole "b,g,h" to any grouping in "l,q,r" I would like to highlight if any cell in that group has changed. ...
    (microsoft.public.excel.programming)