You can do it if you install Mono, the alternative CLR implementation, on Mac OS X:
Mono (software) — Wikipedia, the free encyclopedia[
^].
Mono supports .NET BCL and part of non-standard .NET FCL, and it includes
System.Windows.Forms
. Then you can develop the applications on either Windows, or MAC. On Windows, you can use .NET or Mono, Visual Studio, or SharpDevelop, or MonoDevelop IDE. On Mac, you can use MonoDevelop. In all cases you can use the same assemblies for .NET, Mono for Windows, or Mono for Mac, without recompilation. However, you will face some incompatibilities.
One nice way to do development on Windows would be developing and testing everything on .NET and then testing it for Mono for Windows, and, in case of incompatibilities, fix them and test on Mono again. This way, you can do essential inner development cycle on Windows only. If some code works well on Mono for Windows, additional problems with Mono for other platforms are much less likely.
See also:
SharpDevelop — Wikipedia, the free encyclopedia[
^],
SharpDevelop @ic#code[
^],
MonoDevelop — Wikipedia, the free encyclopedia[
^],
MonoDevelop | MonoDevelop[
^].
Now, more problems: Mono is good for many platforms, but Apple platforms is notoriously hostile to the "foreigners". Even when you successfully develop correctly working Windows Forms application, it will look foreign on Mac; in particular, you will see that the standard Mac menu on top of the desktop is shown as always, but is unrelated to your application, which may have it's own main menu, like in "normal" Windows Forms applications.
Can you develop Mono applications to behave natively on Mac. Yes, but they won't be compatible with Windows. To develop such native interface, you can use another product, Monobjc:
Monobjc — Wikipedia, the free encyclopedia[
^],
Monobjc[
^].
It's usage is much trickier for a Windows developer; you should better understand native Mac development at least a little; and it would be good to understand Objective-C, at least the basic ideas:
Objective-C — Wikipedia, the free encyclopedia[
^].
This may be beyond your question, but I want to mentioned another, pretty exotic possibility: I experimented with Mono development on Mac and tried out the following unusual application architecture: I managed to create two separate UI threads, one running
System.Windows.Forms.Application
, and another one Mac OS X API application. Roughly speaking, one operates main
System.Windows.Forms.Form
, and another one the main Mac-style menu, and some cross-thread code provides collaboration between the two.
—SA