5

Pardon the "cast pun" but I am a (long long) time Delphi developer. I have stayed at version 6 for an eternity now because it was everything I needed for development. However, lately I've been thinking of getting into .NET because that seems to be the dominant direction for Win32/64 EXE development. My biggest concern is having something in .NET that serves as an equivalent to the VCL component model in Delphi.

Let me explain my biggest concern this way. In Delphi, I can create a custom component that once completed, will become a full fledged member of the Delphi component palette ("widget" panel), that I can drag and drop on to a form at design time, and use the IDE's property inspector/editor to fill in properties pertinent to the component and even better, fill out code stubs for various programmer defined event handlers (the latter is like VB and many other IDE's, I know.) But most importantly, I can create component's that act as containers for other components. At design time, I can add child components of a different type than the parent and conveniently fill out the properties and event handlers for the child instances using the same property editor paradigm as for top level components. I have come to adore this capability and I would like to know if .NET has something equally facile at managing/editing components that contain other components at design time.

Jonathan Eustace
  • 2,469
  • 12
  • 31
  • 54
Robert Oschler
  • 14,153
  • 18
  • 94
  • 227

3 Answers3

5

Assuming I understand your request correctly, that's certainly a part of the .NET / Visual Studio feature set.

Using WinForms (the project type most commonly used for desktop application development, though WPF is gaining ground), you can create components that can then be added as child components either to visual controls (or windows, called Forms) or to other components.

Adam Robinson
  • 182,639
  • 35
  • 285
  • 343
4

Windows Forms is basically like VCL for .NET. It provides most of the same component-based behavior that you are used to with VCL, in a very similar style (though a different framework).

That being said, if you're going to jump ship, you may want to consider looking at WPF and Silverlight. They provide a much nicer (once you get over the hump of learning it) model for application development. This is really the preferred development model going forward with .NET (though Windows Forms is still quite popular), as it provides many benefits.

Reed Copsey
  • 554,122
  • 78
  • 1,158
  • 1,373
  • 2
    Are you sure? From what I've heard, WPF and Silverlight are basically dead for desktop development and are only really focusing on development for the Windows Phone 7 platform, which is basically dead as well. – Mason Wheeler Feb 02 '11 at 01:15
  • 2
    @Mason: Not sure where you heard that, but it's completely false. – Reed Copsey Feb 02 '11 at 01:17
  • 4
    Indeed. As a long-time BCB user who refused to use MFC, I was initially shocked at how similar WinForms was to the VCL. But there's a [good reason for that](http://en.wikipedia.org/wiki/Anders_Hejlsberg). – Stephen Cleary Feb 02 '11 at 01:23
  • Can WinForms be used to create components that are containers of child components, as I described above? – Robert Oschler Feb 02 '11 at 03:22
  • @Robert: Yes. It's possible to do so. WinForms was really inspired by, and is almost an extension of, the VCL - which makes sense, given Stephen's link above... – Reed Copsey Feb 02 '11 at 05:58
  • @MasonWheeler Chuckled at that comment about WPF being dead for desktop development; reading it in 2019 :-) – Zimano Apr 20 '19 at 09:32
1

You can try Delphi Prism. It generates .NET executables. http://www.embarcadero.com/products/delphi-prism and http://en.wikipedia.org/wiki/Delphi_Prism

Gregor Brandt
  • 7,659
  • 38
  • 59