Learning WinForms: my first impressions
Posted: (EET/GMT+2)
I've been using Delphi since the first versions, and with that kind of background, learning WinForms in .NET has been an interesting experience. The Visual Studio .NET 2003 designer feels familiar enough: you drag controls to the form, double-click to write event handlers, and adjust properties in the Properties window. From that perspective the transition is smooth.
Where it differs is in the details. WinForms controls are managed objects and not wrappers for native Windows controls in the same way as in Delphi. Anchoring and docking also work differently, but once you try them a few times, they feel quite powerful. Windows resizing also works well.
Events are also more flexible. Instead of each event being one fixed method name like in Delphi, C# lets you attach and detach event handlers dynamically. This makes it easy to reuse components in different places without having to wire everything manually. Also, there can be multiple event handlers for a single event. Cool!
The biggest obstacly for me so far has been learning all the namespaces. Where Delphi has a simple unit structure, but .NET is much more organized but can feel a bit overwhelming at first. Still, the more I work with WinForms, the more I like the consistency.
All in all, my first impression is that WinForms is a solid GUI framework. Different from VCL, but in good ways, and surprisingly productive. I'm starting to like C#, too.