• Welcome to Forum.Deepsoftware.Com. Please login or sign up.
 

DemoRS232 - Not useable in VS2010 (nrcomm 3.03)

Started by moelski, April 26, 2011, 03:31:35 am

Previous topic - Next topic

moelski

Hi !

Today I tried to open the Demo project for RS232.
After converting the project there are some errors which prevent of running the demo.

And as far I can see there is no code for receiving data ...  :o

Greetz
   Dominik

Roman Novgorodov

Hello

Demo RS232 shows two i/o modes: synchronous and asynchronous.
It seems like it turns on the first one by default.
Please try to change MonitorThreadMode in Enable value. It disables any event calls if it has Disable value.

Roman Novgorodov
DeepSoftware.Com
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

moelski

Hi Roman,

I think that is not the problem ...

First I got 3 Errors / warnings:
Error   1   The type 'DemoRS232.Properties.Settings' already contains a definition for 'defaultInstance'   C:\Dev\Visual Studio Kompo\nrComm\Demos\DemoRS232\Properties\Settings.Designer.cs   18   33   DemoRS232
Error   2   The type 'DemoRS232.Properties.Settings' already contains a definition for 'Default'   C:\Dev\Visual Studio Kompo\nrComm\Demos\DemoRS232\Properties\Settings.Designer.cs   20   32   DemoRS232

The warning is about the rs485 Mode ...

Roman Novgorodov

Hello

We have tested our version of RS232 Demo. VS2010 converts and compiles it without any problem.
Please check sources from attachment.

You just need to update assembly reference to nrComm.Core

Roman Novgorodov
DeepSoftware
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

moelski

Hi !

Ok that version works better.
But there is still another problem:
Quote{"Cross-thread operation not valid: Control 'statusStrip1' accessed from a thread other than the thread it was created on."}
;)

Roman Novgorodov

Hello

This exception is normal for VS projects.
The event handlers are executed in other thread than main form thread.
You need call Invoke for change visual controls state.

But NrComm can help if you will set UseMainThread in true.

Roman Novgorodov
DeepSoftware
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

moelski

QuoteYou need call Invoke for change visual controls state.

I know that  :)
But just want to let you know that there meight be other users who have problems with that ....  ;)

Roman Novgorodov

Hi

Yes.
There is NrComm.UseMainThread property for lazies.  :)

Roman Novgorodov
DeepSoftware.Com
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.