.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Code For serial Communication in C#.net 2005?

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :WPF

I want to develop a windows application in C#.Net 2005.

In this there is one textbox and one button.

My PC will be connected to other PC via serial port.

Application will be running on my PC.
Now when I type "Hello World" in my textbox and then click button.

This text should be shown on hyper terminal of the other PC.
I don't want to receive that text on other PC, I just have to send that text from my PC.

How To Do This?

View Complete Post

More Related Resource Links

Serial Communication with the .NET Compact Framework

Learn how to make your applications communicate over a serial port and how to handle common issues when implementing serial solutions. After a general discussion about serial communication and a common serial communication standard, this article demonstrates a practical use of the technologies through sample source code written in C#.

Serial Port Communication Read and Write using C#.net

In this simple article you will learn that how you can Open and read COM port data using System.IO.Ports Namespace.
Simply just create New Project of windows application in C#.

Import ServiceProcess APIs
using System.IO.Ports

Imports System.IO.Ports

Write Parsing functions which parse port data according to attached device

Robotics: Writing and Testing VPL Services for Serial Communication


VPL, part of Robotics Developer Studio is intended for novice programmers, but is also useful for testing and prototyping. We write a simple serial port service that allows you to send and receive data.

Trevor Taylor

MSDN Magazine February 2010

C++ at Work: Managed Code in Visual Studio 2005


Many of you are no doubt in the process of upgrading to Visual Studio® 2005, so I thought now would be a good time to relate some of my own experiences with the new compiler. What took me so long? Hey, I'm a retro kind of guy! Better late than never!.

Paul DiLascia

MSDN Magazine June 2006

Safe!: Repel Attacks on Your Code with the Visual Studio 2005 Safe C and C++ Libraries


When Visual Studio 2005 ships, it will include a major upgrade to the Visual C++ Libraries that was the result of a complete security review of the functions contained in the C Runtime Library, Standard C++ Library, ATL, and MFC. From that extensive review came the Safe C and C++ Libraries, which can improve the security and robustness of your apps.

Martyn Lovell

MSDN Magazine May 2005

C++: Write Faster Code with the Modern Language Features of Visual C++ 2005


The next version of Visual C++ has a new syntax that is both elegant and powerful. It has new optimization technology that has improved the speed of Microsoft. It has new compilation modes that ensure Common Language Infrastructure compliance and verifiability for the .NET Framework, and it has new models for interop. In this article Stephen Toub explains these and other improvements to Visual C++.

Stephen Toub

MSDN Magazine May 2004

consume VC++.net 2005 code in C#.net 2005 project

how we can consume VC++.net 2005 code in C#.net 2005 project. please some one show me example

Accessing code in InfoPath 2003 forms from Visual Studio 2005

Can vbscript code contained in an InfoPath 2003 form be accessed from VS2005 on a machine running Office 2010? We are testing Office 2010 our our PC's and the custom task pane code that works just fine on PC's running Office/InfoPath 2007 does not run on the test PC's. I've been reading that the vbscript code in the form can't be edited directly when opening the form in InfoPath 2010, but that's not what I'm trying to do. I want to access the vbscript code through the .Extension property of the XDocument object from client side javascript code on an .aspx page like we have done for years. The existing code, which runs perfectly on PC's with Office/InfoPath 2007,  looks like this ... var xDoc = window.external.Window.XDocument; xDoc.Extension.UserLookupDone (userid); When run on PC's with Office/InfoPath 2010 the code throws error "Class doesn't support Automation". Are we trying something that is no longer possible? Any help is appreciated.

Create DLL from C code using Visual Studio 2005

I have a commercial application (ZEMAX) that uses DLLs to describe problem geometry.  They provided source code in C for one of their DLLs.  I would like to modify that source code and generate a modified DLL.  Can I do that with Visual Studio 2005 (how?) or do I need a different IDE?

I 'm new to vs.net 2005,need help to get asp.net 2.0 demo code ,thanks!

hello,          I 'm new to vs.net 2005,now I am studying asp.net 2.0  technology ,I  need the demo  code like   Duwamish 7.0 CS  in vs.net 2003 verison  to improve my coding and develpoment my asp.net application.        if somebody can give me a favor,  thanks!              

SSRS 2005 to 2008R2 custom code migration issue


We have an SSRS 2005 report that we upgraded to 2008R2 with custom code in the report properties code tab that no longer works.  We checked permission setting in the report server config files, checked if the data set was passig nulls and it is not, looked to see if we ignored the error if the report would render the correct value anyway despite the error and it did not, tried different code variations and referencing different system libraries without luck....we are truly baffled.  The only thing that does work is setting the total to 0 and removing the loop through the jsColl to compute the total.  Here is the code that used to work on 2005.  Any ideas why it does not work on 2008R2?  We call it in an expression =Code.getTotal()



jsColl As Microsoft.VisualBasic.Collection


Full duplex pc to half duplex serial communication with SerialPort class in C++ (but any language wi


Hello.  I am a bit new to the .NET environment, and though I feel I was able to get a good handle on most of the basics of .NET, I believe I've encountered a problem beyond the basics.  I am trying to talk with a device called a ColorPAL that uses asynchronous serial communication, but it is half-duplex instead of full-duplex.  I am able to send it the hex string commands that it wants just fine with the TX line.  However, I find myself unable to read because the RX isn't connected to anything.  Basically what I want to do is that I want to be able to swap the TX line to become a RX line so that I can then read line of the half-duplex.  I read that there is a PinChanged event, so it lead me to believe there is a way to change pins??   If the RX line is very high impedance I could connect it to the TX line, but I have no idea about that.


How can I get a full duplex to read a half-duplex using the visual studio software?


Here is the code I'm using, in case that helps.

#include "stdafx.h"
#include <Windows.h>

using namespace System;
using namespace 

SQL Server 2005 Express Code 641 for SP2



I've installed SQLEXPR_ADV.EXE without a problem. Windows update is now telling me I have "1 Important update" which is  SQL Server 2005 Express edition with Advanced Services Service Pack 2 (KB921896). Unfortunately, it won't install. It just keeps giving me a "Failed installation" and "Error code: Code 641"


I am running Vista Ultimate 64 bit machine. Below is my system info that pulls up under the Management studio. Everything seems to work OK but I see there are a lot of bug fixes in this service pack and would like to get them updated. Any help on this error and how to get this updated would be appreciated. Thanks!!!



Microsoft SQL Server Management Studio Express      9.00.3042.00
Microsoft Data Access Components (MDAC)      6.0.6001.18000 (longhorn_rtm.080118-1840)
Microsoft MSXML      3.0 4.0 5.0 6.0
Microsoft Internet Explorer      7.0.6001.18000
Microsoft .NET Framework      2.0.50727.3053
Operating System      6.0.6001

.NET Serial/COM Port Communication over Terminal Services



I hope I'll be able to clearly formulate my question.

Scenario: we have an application that integrates with several type of scanners (i.e. credit card, barcode, passport) using serial port interface.
It's the desktop application and can be deployed to run either in stand-alone environment or can be published over terminal services layer (citrix, TS, etc).
In the preferences of the application users are able to specify which scanner is assigned to which COM port.
For example: bar code scanner = COM1, credit card scanner = COM5.
To a user, names of the COM ports don't really make much sense and they won't know that the bar code scanner needs to be assigned to COM1 unless they go to Device Manager and look up the device name associated with the COM port under Ports (COM & LPT) section.

SerialPort class in .NET Framework has the function GetPortNames that returns the list of available COM ports: COM1, COM3, COM5, COM6, etc.
After doing a little research I found a way to get the descriptive names of each COM port device using WMI.

Here is the code for this:

  Public Shared Function GetAvailableSerialPorts(

SQL Server 2005 restore error, code 23



I try to restore a MS SQL Server 2005 backup file

     FROM DISK='F:\Munka\NFU\nfudb_20101007\nfudb_20101007.bak'
WITH MOVE    'cstteszt' TO 'F:\Munka\NFU\opten.mdf',
MOVE 'cstteszt_log' TO 'F:\Munka\NFU\opten.ldf'

And this is the error code I get:

Msg 3203, Level 16, State 2, Line 2
Read on "F:\Munka\NFU\nfudb_20101007\nfudb_20101007.bak" failed: 23(error not found)
Msg 3013, Level 16, State 1, Line 2
RESTORE DATABASE is terminating abnormally.


Can you  pls help?

Do I need to install some patch? Or? Any ideas are welcome!



CRUD Stored Procedure Code/Scripts Generator for SQL SERVER 2005


I need a simple anf functionally CRUD Stored Procedure Code/Scripts Generator.

Anyone have a solution?

Thanks in Advance.

Where to find code samples for "SQL Server 2005 Analysis Services Step by Step" book?


I am reading SQL Server Analysis Services from "SQL Server 2005 Analysis Services Step by Step" book and I want to download the code samples for the same. Please tell me how I can do that?

Thanks in advance,
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend