mscomm & richtext on VB.NET 2008

  • Thread starter Thread starter Mr. X.
  • Start date Start date
Mr. X. said:
Hello.
How can I use MSComm & RichText components on Visual studio 2008 (VB.NET).

Both should be droppable from the toolbox window. MSComm was for serial
port? Then it's the SerialPort component now.


Armin
 
Mr. X. said:
What library should I include in references ?
(What is the library description ?)

By Default it's already in the toolbox. If you it's not there,
right-click and choose "customize..". You'll find it somewhere.
Also What should I use instead of richtxt ?

Why do you want to replace it?


Armin
 
What library should I include in references ?
(What is the library description ?)

Also What should I use instead of richtxt ?

Thanks :)
 
1) About the new system.io.ports.SerialPorts, it not the same as the old
comm contrrol.

I used before (and I would like to know what is the equivalent for VS NET)
the following properties :
commPort
SThreshold
RThreshold
Setting
OutBufferSize
InputMode
OutBufferCount
Handshaking, also : comXOnXOff, comRTS.
(I am using the RS232).

2) For RichTxt - I don't need something else, but when upgrading it wasn't
compatible to old one.

Thanks :)
 
Mr. X. said:
1) About the new system.io.ports.SerialPorts, it not the same as the old
comm contrrol.

Yes, it's not. You wanted a replacement. If it was the same, it wouldn't
be a replacement. ;-)

I used before (and I would like to know what is the equivalent for VS NET)
the following properties :
commPort
SThreshold
RThreshold
Setting
OutBufferSize
InputMode
OutBufferCount
Handshaking, also : comXOnXOff, comRTS.
(I am using the RS232).

I can't tell you. If you won't get an answer here, try a language
independent group like m.p.dotnet.framework.

I've also found this: (VB 2005)
http://msdn.microsoft.com/en-us/library/ms364066(VS.80).aspx
(didn't read it)

2) For RichTxt - I don't need something else, but when upgrading it wasn't
compatible to old one.

Maybe this helps:
http://msdn.microsoft.com/en-us/library/ms234980.aspx


(BTW, there's also m.p.d.languages.vb.upgrade, but as it's somewhat
dead, here is probably the best place to ask)


Armin
 
Hi,

You should use the built-in SerialPort object (it is in the Toolbox).

RTF will (almost certainly) be a binary format -- what is sending the data,
and... Do you really want RTF?

I have examples in my book that use both a standard textbox, and RTF textbox
for display. However, I do use the RTF textbox for its font and color
features, not because it can display RTF files.

If you are transferring an actual RTF file, you may want to use an protocol
like XMComm (download control from my website, and the actual source code is
in my book).

I'd need to know more about what you really want to do, to suggest anything
more specific.

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
I just need to check a very old machine, which I doing the transferring &
getting data to that machine with RS232 cable.
When doing that, I need to view with a simple editor, the code behind -
making the elements with bold, other fonts, etc.

Thanks :)
 
I found for portname, baudRate, Parity, and other properties, but for :
SThreshold, handshake - I didn't find any equivalent properties ...

Thanks :)
 
Mr. X. said:
I found for portname, baudRate, Parity, and other properties, but for :
SThreshold, handshake - I didn't find any equivalent properties ...

There's a Handshake property.
As there is no 'DataSent' event (in opposite to the DataReceived event)
there is consequently also no SThreshold property.


Armin
 
The properties that are still misunderstood due compitablity :
SThreshold
OutBufferCount
InBufferCount
InputMode = comInputTextMode

What are the equivalent properties for DOT.NET ?

Thanks :)
 
Mr. X. said:
The properties that are still misunderstood due compitablity :
SThreshold

see my prev message
OutBufferCount
BytesToWrite


BytesToRead

InputMode = comInputTextMode

Not required. There are several Read* methods that allow to read bytes
or text. See also the Encoding property for correct conversion.
What are the equivalent properties for DOT.NET ?

I've never used the SerialPort class but the object browser shows all
you need. :)


Armin
 
I have examples that do this in my book. What you do is write code that
parses (interprets) the actual "elements" and assigns each element a font
and color (SelectedFont, SelectedColor), then adds it to the RTF box using
the SelectedText method. Of course, this is for viewing... Editing may be
more complex.

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
Back
Top