back to article Replaced several times but still live and kicking: Windows Forms updated for .NET 6.0

Microsoft's oldest .NET desktop framework, Windows Forms, has been improved for .NET 6, though full support for high resolution displays is "a challenging undertaking," according to software engineer Igor Velikorossov. The first release of Windows Forms was in February 2002, when it was positioned as the successor to Visual …

  1. AMBxx Silver badge
    Windows

    Missed opportunity

    It always seemed such a missed opportunity that we weren't able to design web applications using the windows form designer and have some magic in the background fix all the annoying formatting issues associated with HTML.

    That time has passed...

    1. NerryTutkins

      Re: Missed opportunity

      That's basically what ASP.NET web forms is, which Microsoft has effectively killed by not rolling that through to .NET 5/6

      1. Nick Ryan Silver badge

        Re: Missed opportunity

        Except ASP.NET web forms was also Microsoft developers pretending that an HTML page was a modal system window, murdering it with unnecessary and accessibility failure JavaScript and then trying to foist this broken model onto many developers.

        It's not that it couldn't be used in a sane way, however that took a lot of effort and experience from a competent web developer of which there is/was a dire shortage and a windows client application developer tends not to be a competent web developer. It was always obvious that something would be repeatedly and fundamentally broken on a page as soon as the on-hover status bar of a web browser showed "PostBack" all over the place...

  2. trevorde Silver badge

    Code like it's 1992!

    It's 2022 and the recommended method of creating a WPF interface is to type it in by hand. Mind you, there are no WYSIWYG editors for web UIs either after 30 years.

    1. }{amis}{
      Alert

      Re: Code like it's 1992!

      There were WYSIWYG editors for html the problem is they all sucked, fire up an old copy of dreamweaver sometime and look at the code horror-show that it auto-creates when using its drag and drop features.

      1. AMBxx Silver badge
        Joke

        Re: Code like it's 1992!

        Frontpage was great!!!!!

        1. David 132 Silver badge
          Happy

          Re: Code like it's 1992!

          <blink>Yes it was!</blink>

          **This Comment Best Viewed Using Internet Explorer 4.0 At 800x600 and 256 Colours*

      2. katrinab Silver badge
        Alert

        Re: Code like it's 1992!

        And Dreamweaver was far from the worst example out there.

    2. Abominator

      Re: Code like it's 1992!

      WPF is a half arsed mess.

      Some guy with a hard on for XML configuration of GUI's built it and then realised what he had done and quietly ran away as he handed it over to Microsoft marketing people.

      It should be taken outside and shot.

  3. Ross 12

    Microsoft need to kill it off like they have with IE rather than just politely suggesting that devs move on to something new.

    1. Clausewitz 4.0
      Devil

      Even IE wasn't killed yet. Almost all DLLs are still lurking around. The default icon to iexplorer.exe was killed, tough.

  4. }{amis}{
    Unhappy

    As a developer in both WPF and Winforms....

    WPF is clearly the more capable framework but the problem is for the glorified spreadsheets that 95% of all business apps boils down to its massively bloated overkill.

    WPF just cannot compete with how fast a simple form can be thrown together in winforms.

    1. Abominator

      Re: As a developer in both WPF and Winforms....

      More capable but fucking slow and shit.

  5. Filippo Silver badge

    Back when Windows Forms was originally designed, most Windows developers were still doing their job in C++ using the Win32 API, maybe under a MFC layer. That's largely an imperative API, with a bunch of weird wonky bits and some shortcuts to shuffle data between the screen and your model.

    Most of them had never used anything remotely like XAML bindings before. Also, a lot of people who were making Win32 programs were, well, self-taught amateurs in the field of software development, because they were professionals in something else (that happened to need some simple program put together quickly and cheaply). They went around setting Button.IsEnabled to true or false smack in the middle of business logic, and they liked it.

    It's not easy to grok a drastically different design paradigm, when you've never seen anything like it, you don't have a solid understanding of what's going on underneath, and you are on a deadline.

    Put simply, if Microsoft hadn't made Windows Forms, a crapload of developers would never have jumped to .NET.

    1. AndrueC Silver badge
      Boffin

      Oh not all C++ developers saddled themselves with MFC. Some of us found something better long before .NET and Winforms. And moving from the VCL to WinForms was a trivial step, not hugely surprising given who was behind them both ;)

      In fact even before they gave us RAD Borland's OWL was a better framework than MFC. It was more consistent and coherent.

      1. Nick Ryan Silver badge

        What's particularly notable is that despite some odd standing-on-head-and-clapping implementations within the VCL, the layout engine that it exposed by default was considerably superior to almost anything I've come across since. Yes, it caused some nasty redraw issues but in general it was stable as hell. Working with variable display DPI resolutions in an appropriately designed form using the VCL was almost easy as long as the interface was constructed in a sensible manner and dynamic code didn't make assumptions.

      2. iron Silver badge

        Some of us were Delphi developers and, as you say, moving from VCL to WinForms was trivial.

        1. AndrueC Silver badge
          Thumb Up

          I was Delphi originally. In fact TP for CP/M was my first serious language choice (after BASIC for ZX Spectrum and CPC). But as our development team grew I decided to make the switch to C++.

          One of Builder's great features was that we could utilise the hard work of all you Delphi developers :)

      3. itzumee

        OWL was a proper abstraction of the Windows API, unlike MFC which was essentially the Windows API without windows handle arguments, which meant a less steep learning curve for MFC, not that OWL had a steep leaning curve.

  6. karlkarl Silver badge

    I was quite fan of Winforms. I always wished they would make a bindings for C++ (Microsoft calls these "Language projections" for some stupid reason).

    I liked Borland C++Builder 5 and 6 (the later stuff because unusably bloated with crap) but there was very basic resizing / layout support. Winforms had anchoring but that really only worked well with a WYSIWYG designer (which are generally fairly unmaintainable, especially if closed-source).

    So moving on, I really wanted something that could be crafted 100% in code but not using ancient HBox / VBox designs like HTML Tables / Flexbox or what much of Gtk+ or Qt uses. Don't get me wrong, these provide the best solution in terms of scaling but are very slow and painful to actually develop by hand.

    As an aside I came up with a new layout system working via instructions; currently in the early stages of getting it added to upstream FLTK. If this kind of stuff interests you, you might like to check it out: https://github.com/osen/Fl_Flow

  7. tiggity Silver badge

    Win Forms has the advantage that its so established that MS still have not dared kill it. Long in the tooth devs will have had too many experiences of MS singing the praises of their latest & greatest tech, only to kill kit a few years later (silverlight anybody?) - so doing something in win forms is relatively safe as its unlikely to be hit by short notice death given its ubiquity.

    1. SoulFireMage

      Accurate

      This is me.

      They kill their darlings and its annoying and dispiriting. Even now I do not trust their commitment to Wpf because of all the strange noise around uwp and previously some weird mess they made with html.

      Same goes for the Web stuff - still on asp Web forms as it's worked for a long time. I know there's better out there but my work isn't Web focussed so I ain't invested the hours to learn it.

      Winforms solves business problems that earn my living :)

      1. AndrueC Silver badge
        Boffin

        Re: Accurate

        If you are fluent in WPF you can develop a form as quickly as WinForms and if you follow MVVM practice (which you can do in WinForms but you have to be more disciplined) it will be more maintainable. Complex forms are a lot easier to code in WPF because inter-dependant controls are generally a non-issue.

        In both cases I'd recommend DevExpress to smooth things along. Well..mostly. Some of their stuff can be a bit weird at times but familiarity solves most problems and their technical support is excellent.

        The trick is not to use the visual designer because that tends to be a slow and iterative process. It's quick for simple forms but not for anything complicated. WinForms without the designer is ugly and difficult. WPF without the designer is only slightly ugly and is fairly easy to read and understand.

  8. This post has been deleted by its author

  9. SoulFireMage

    No - I challenge that, needs context

    "It is not a good choice for a GUI application today, being Windows-only and a weak option even on Windows,"

    That's bullshit without more context.

    For developing custom applications used by one company with a limited user base yet complex business requirements, it's still ace. I can use a visual designer, I can code just on the back of the form, or I can use business classes and layers of architecture.

    Where is the weakness here?

    I did try Wpf but Microsoft wobbled, messed around and left me with the impression it was going away. It hasn't but when it takes a lot of time and effort to shift a project from one UI to another, why would I change if I think they're gonna chop and change.

    I disagree with the whole "must throw away and jump on the latest thing" mindset. For businesses they need stuff to be stable, predictable and relatively easy to maintain.

    Having constant new UI technology doesn't deliver that.

    I like the idea that I may be working with a refined winforms technology in .Net 6. I'd loathe the idea of being told I must change to a different one, when for what we need, this works.

  10. localzuk Silver badge

    Win Forms rules in the rapid development space

    Need a little application that does something quickly and simply? WinForms is your friend.

    I've got an army of little applications written over the years, all doing their little tasks nicely. Used one 5 minutes ago - simple WinForm UI to turn text into speech using Google's voice API. Took less than 30 mins to make originally. Spits out audio files for use when we want an IVR on our phone system. Why would I have invested more time in one of the many newer UI frameworks? The last time I did that, MS killed the framework off entirely (Silverlight).

  11. Abominator

    "In late 2006, Microsoft introduced Windows Vista and along with it a new .NET desktop framework called Windows Presentation Foundation (WPF). Unlike Windows Forms, it used DirectX to render graphics, enabling richer designs with hardware accelerated performance."

    If that's the case, why is WPF shit-ass slow and WinForms outperforms it by some margin?

    All their new frameworks fucking suck.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Other stories you might like