1

I'm developing an application with a GUI for a project. (my first GUI application ) At the moment, I'm doing some research on how to create a GUI for windows. So far, I've decided to use Windows forms to create a GUI. Are windows forms part of the .NET framework? Also, I need to be able to draw graphics on the forms. Most of the tutorials on the web suggest using something called GDI+. Is this also part of the .NET framework?

EDIT: I had initially typed GDI.. I meant GDI+

mahela007
  • 1,399
  • 4
  • 19
  • 29

2 Answers2

2

WinForms are a part of .NET and GDI/GDI+ is a Windows/.NET API. However, depeding on the type and the complexity of graphics you need to draw, you might want to consider WPF, which is another (newer) GUI framework in .NET.

WinForms is the "old" .NET framework for building GUIs. It is code based (as in, your GUI elements are set up from source code) and uses GDI+ to draw itself. GDI+ is considered a legacy API, and I'd say WinForms is close to that as well.

WPF is a .NET 3.0+ framework for building GUIs. It is markup-based (as in you define your GUI in an XML). It relies on DirectX to draw itself, offering much greater graphical performance and precision. But the biggest pro of WPF is the increased productivity - I've used both extensively, and from my point of view, some things are much easier to do in WPF, and the resulting code is usually cleaner. Also see this question.

Community
  • 1
  • 1
Filip
  • 2,285
  • 1
  • 19
  • 24
  • Could you please clarify this bit: " GDI/GDI+ is a Windows/.NET API" – mahela007 Apr 14 '13 at 15:38
  • @mahela007 GDI and GDI+ aren't part of the .NET Framework, they're part of the OS. The `System.Drawing` namespace, however, provides a wrapper for you, so you can easily draw without having to invoke the C++ interface directly. – Filip Apr 14 '13 at 16:39
0

WinForms are a part of the .NET framework. GDI+ is a part of the .NET framework.

David Tansey
  • 5,813
  • 4
  • 35
  • 51