Author Topic: DemoRS232 - Not useable in VS2010 (nrcomm 3.03)  (Read 2101 times)

moelski

  • Full Member
  • ***
  • Posts: 122
    • View Profile
DemoRS232 - Not useable in VS2010 (nrcomm 3.03)
« on: April 26, 2011, 06:31:35 am »
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

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: DemoRS232 - Not useable in VS2010 (nrcomm 3.03)
« Reply #1 on: April 26, 2011, 07:01:20 am »
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

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Re: DemoRS232 - Not useable in VS2010 (nrcomm 3.03)
« Reply #2 on: April 26, 2011, 07:03:36 am »
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

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: DemoRS232 - Not useable in VS2010 (nrcomm 3.03)
« Reply #3 on: April 26, 2011, 08:58:42 am »
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

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Re: DemoRS232 - Not useable in VS2010 (nrcomm 3.03)
« Reply #4 on: April 26, 2011, 09:05:41 am »
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

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: DemoRS232 - Not useable in VS2010 (nrcomm 3.03)
« Reply #5 on: April 26, 2011, 09:49:26 am »
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

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Re: DemoRS232 - Not useable in VS2010 (nrcomm 3.03)
« Reply #6 on: April 26, 2011, 10:34:23 am »
Quote
You 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

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: DemoRS232 - Not useable in VS2010 (nrcomm 3.03)
« Reply #7 on: April 26, 2011, 05:01:59 pm »
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.