Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows GUI Programming - C + SDK or C# + Windows Forms

I'm a C programmer with lots of server code experience (AIX, HPUX, some Linux) I need to write a GUI program for Windows (2000, XP, Vista, 7) which requires CAD-like drawing functions and lots of data entry forms (it's a specialised engineering app). I've written some Win32 code many years ago using Gupta SQLwindows (now Centura Builder). The bosses have decreed that it "must be" compiled code. My perception is that C+SDK could do the job but with considerable effort and that C# + Windows Forms would be more capable, but I'm a bit concerned about the .Net framework requirement.

Based upon your experiences, What would you suggest?

If .Net, which version? 2.0, 3.0, 3.5 ??

like image 936
CyberFonic Avatar asked Dec 29 '22 23:12

CyberFonic


2 Answers

I'm not familiar with Centura Builder, so I am not sure at what level of abstraction your prior Windows programming experience is. If you choose the native code route using C/C++ and Win32, be sure to buy a copy of Programming Windows by Charles Petzold. Reading the first few chapters of this book can help you decide if you want to go the native code route as well.

If you choose the .NET Framework and C#, and if you do not need the version 3.5-specific features (such as LINQ for database access), I recommend choosing version 3.0. It is a built-in component on Windows Vista, so you don't have to package the runtime with your program installer unless you have to support Windows XP (which you probably do, so never mind :). With version 3.0, you get Windows Presentation Foundation (to use instead of or along with Windows Forms), which gives you a lot of graphical capability without a lot of effort. I'm not knowledgeable about CAD, so I don't know if WPF would provide the drawing functions that you need, but it may provide a great platform upon which you can write your own drawing routines.

EDIT: I missed your Windows version requirements on first reading, particularly the Windows 2000 requirement. I guess you'd have to go with .NET Framework version 2.0 and Windows Forms. I have to ask, though: Wouldn't it be cost-effective to improve your engineers' productivity by upgrading their eight-year-old machines to something newer and faster and therefore get rid of your Windows 2000 support requirement?

like image 111
Jay Michaud Avatar answered Jan 08 '23 23:01

Jay Michaud


If you're going the .NET route, you will have to use .NET 2.0 because .NET 3.0 and above is only supported for Windows XP and above (Vista, 7, 2003, 2008).

I personally wouldn't sweat the .NET framework requirement. It's a one time install on each machine, that can be streamlined through Windows updates if needed.

like image 20
Ray Avatar answered Jan 08 '23 23:01

Ray