Windows GUI 编程 - C + SDK 或 C# + Windows 窗体 [英] Windows GUI Programming - C + SDK or C# + Windows Forms

查看:36
本文介绍了Windows GUI 编程 - C + SDK 或 C# + Windows 窗体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一名 C 程序员,有很多服务器代码经验(AIX、HPUX、一些 Linux)我需要为 Windows(2000、XP、Vista、7)编写一个 GUI 程序,它需要类似 CAD 的绘图功能和很多数据输入表格(这是一个专门的工程应用程序).多年前,我使用 Gupta SQLwindows(现在是 Centura Builder)编写了一些 Win32 代码.老板已经下令它必须"编译代码.我的看法是 C+SDK 可以完成这项工作,但需要付出相当大的努力,而且 C#+Windows 窗体的能力会更强,但我有点担心 .Net 框架要求.

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?

如果是.Net,是哪个版本?2.0, 3.0, 3.5 ??

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

推荐答案

我对 Centura Builder 不熟悉,所以我不确定您之前的 Windows 编程经验处于什么抽象级别.如果选择使用C/C++和Win32的原生代码路线,一定要买一本Programming窗户 by Charles Petzold.阅读本书的前几章可以帮助您决定是否也想走原生代码路线.

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.

如果您选择 .NET Framework 和 C#,并且如果您不需要 3.5 版特定的功能(例如用于数据库访问的 LINQ),我建议您选择 3.0 版.它是 Windows Vista 上的内置组件,因此您不必将运行时与程序安装程序打包在一起,除非您必须支持 Windows XP(您可能会这样做,所以没关系:).使用 3.0 版,您可以获得 Windows Presentation Foundation(用于代替 Windows 窗体或与 Windows 窗体一起使用),它为您提供了大量图形功能,而无需付出很多努力.我对 CAD 一窍不通,所以我不知道 WPF 是否会提供您需要的绘图功能,但它可能提供了一个很好的平台,您可以在此平台上编写自己的绘图程序.

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.

我在第一次阅读时错过了您的 Windows 版本要求,尤其是 Windows 2000 要求.我想您必须使用 .NET Framework 2.0 版和 Windows 窗体.不过,我不得不问:通过将已使用 8 年的老机器升级到更新更快的机器从而摆脱对 Windows 2000 的支持要求,提高工程师的工作效率是否具有成本效益?

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?

这篇关于Windows GUI 编程 - C + SDK 或 C# + Windows 窗体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆