|
From: | Ian Game |
Subject: | Re: [DotGNU]pnetlib on Visual Studio |
Date: | Fri, 12 Sep 2003 15:07:13 +0100 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826 |
Guys, I'm doing a build from the project supplied by Neil Cawse (thanks) and have the following problem. In Control.cs, there is a cast from the enum type 'Keys' to type 'char' to pass as an argument to 'KeyPressEventArgs(...)' One way of fixing is this: args2 = new KeyPressEventArgs((System.Convert.ToChar(msg.key))); to make it compile. Sorry but I'm a bit new to C# and from the documentation it says that a cast can be implicit if no data loss occurs or explicit as the original code thus: args2 = new KeyPressEventArgs((char)(msg.key)); Another way is this: args2 = new KeyPressEventArgs((char)(int)(msg.key)); ..which is telling us that there is a cast explicitly from enum to int(enum which is int anyway by default), then from int to char, and this works but looks messy.
Is there something in the MS compiler that's different? My version is a bit old: Microsoft Visual C# .NET 55603-652-0000007-18026Using cscc it works fine (without the extra casts) so is the MS compiler at fault here?
Thanks Ian Neil Cawse wrote:
Here is a link to today's snapshot of pnetlib with the MS Visual Studio 1.1 project files. It is 5MB in size http://geotab.homeip.net/neil/VS1.1Pnetlib25Aug03.zip Just open the main project and run. You can convert the project easily enough back to VS 1.0, if you wanted to - Google for help. VS has a nasty habit of adding back in its own references in the projects to Microsofts System.x stuff. We are keeping System.Drawing.Win32 and System.Drawing.Xsharp in lock step. So controls should look and work identically in both environments. You can use this to contribute on Windows until we get System.Drawing.Win32 running using pnet. -----Original Message-----From: Gnanavel S [mailto:address@hidden Sent: Monday, August 25, 2003 9:14 AMTo: Neil Cawse Subject: Re: [DotGNU]Help needed to run FormsHello.exe Hi Neil, could you mail me the MS project file, that you use to compile the PNet framework and libraries, also do indicate it to me, if there are any special things required for the PNet to run on Windows OS Regards Gnan _______________________________________________ Developers mailing list address@hidden http://dotgnu.org/mailman/listinfo/developers
[Prev in Thread] | Current Thread | [Next in Thread] |