Geeks With Blogs

News
WinToolZone - Spelunking Microsoft Technologies
I work as a developer on the Common Language Runtime (CLR) team, specifically in the areas of exception handling and CLR hosting.
Disclaimer

The information in this weblog is provided "AS IS" with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion. Inappropriate comments will be deleted at the authors discretion. All code samples are provided "AS IS" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

Inside and Out... An attempt to understand technology better...

Anyone who has worked with .NET Compact Framework for sometime will know that the IrDA support is provided by the same - you can write applications that can act as IrDA listeners or clients - basically, do whatever you want using IrDA as long as you are using the .NET Compact Framework.

But, how about using IrDA in regular WinForms applications?

Well, until I just stumbled upon the trick I will just tell you [it's really a no-brainer], one would need to write WinSock based IrDA applications for the regular desktop for the IrDA .NET CF client. But not anymore...

I am in the process of writing one such client server application based on IrDA and try out .NET Framework 2.0 capabilities and needed to use IrDA in WinForms - and didn't want to use WinSock. After much search on Google and seeing the similar question being asked by many, I finally stumbled upon the following solution that is working for me.

In my VS 2005 installation, the Compact Framework SDK assemblies reside at E:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\CompactFramework\WindowsCE. This folder also contains System.Net.IrDA.dll assembly. All you have to do in your WinForms application is to place a reference to this assembly and the magic happens!

What say :) ?

Posted on Sunday, September 26, 2004 11:19 PM .NET Framework , VS 2005 , .NET Compact Framework | Back to top


Comments on this post: Want to use IrDA in WinForms?

# re: Want to use IrDA in WinForms?
Requesting Gravatar...
Can I have a small sample app for regular (desktop) WinForms please?

Thanks in advance :)

Manu
Left by Manu on Oct 22, 2004 12:13 AM

# re: Want to use IrDA in WinForms?
Requesting Gravatar...
i need to know how to use irda.dll in microsoft .net 2003
Left by saad on Dec 20, 2004 10:14 PM

# re: Want to use IrDA in WinForms?
Requesting Gravatar...
I made one for WinForms, search for IrDA in the GotDotNet workspaces
Left by Toby Couchman on Mar 01, 2005 8:05 PM

# re: Want to use IrDA in WinForms?
Requesting Gravatar...
hello every body i want a sample of your application if its possible.
thank you

my email : quinzaki01@yahoo.fr
Left by quin on Dec 29, 2005 1:23 PM

# re: Want to use IrDA in WinForms?
Requesting Gravatar...
System.Net.IrDA.dll assembly is not in
C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\CompactFramework\WindowsCE.
Why and how to solve this?
Left by amygal on May 17, 2006 7:53 PM

# re: Want to use IrDA in WinForms?
Requesting Gravatar...
It is actually in X:\Program Files\Microsoft Visual Studio 8\Smart Devices\SDK\2.0\2.0\Windows CE or something to that effect. You could always just run a search on it.
Left by Dom O'Dierno on Nov 06, 2006 11:44 AM

# re: Want to use IrDA in WinForms?
Requesting Gravatar...
Does this dll available in MVS2005 Express Edition with .net framework 2.0? Because I couldn't find this assembly . Thanks.
Left by aji_java on Nov 23, 2006 4:45 AM

# re: Want to use IrDA in WinForms?
Requesting Gravatar...
Please help me.. I dont know why its calling this error:

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /errorreport:prompt /warn:4 /define:DEBUG;TRACE;PocketPC /win32res:"C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\bin\hiDPI.res" /reference:"C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\CompactFramework\2.0\v2.0\WindowsCE\mscorlib.dll" /reference:"C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\CompactFramework\2.0\v2.0\WindowsCE\System.dll" /reference:"C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\CompactFramework\2.0\v2.0\WindowsCE\System.Net.IrDA.dll" /reference:"C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\CompactFramework\2.0\v2.0\WindowsCE\System.Windows.Forms.dll" /reference:"C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\CompactFramework\2.0\v2.0\WindowsCE\System.Xml.dll" /debug+ /debug:full /filealign:512 /optimize- /out:obj\Debug\DeviceApplication3.exe /resource:obj\Debug\DeviceApplication3.Form1.resources /resource:obj\Debug\DeviceApplication3.Properties.Resources.resources /target:winexe Form1.cs Form1.Designer.cs Program.cs Properties\AssemblyInfo.cs Properties\Resources.Designer.cs
C:\Documents and Settings\Daniel\Dokumenty\Visual Studio 2005\Projects\DeviceApplication3\DeviceApplication3\Form1.cs(3,18): error CS0234: The type or namespace name 'IrDA' does not exist in the namespace 'System.Net' (are you missing an assembly reference?)

Compile complete -- 1 errors, 0 warnings
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========
Left by Dan on Dec 02, 2006 1:43 PM

Your comment:
 (will show your gravatar)


Copyright © Gaurav Khanna | Powered by: GeeksWithBlogs.net