January 30, 2018
On Monday, 29 January 2018 at 22:55:12 UTC, I Lindström wrote:
> I've been Googling a ton these past few days for some kind of a book or a course on how to code desktop applications for Windows, but either there isn't one, or it's very well hidden.

"Programming Windows" by Charles Petzold, 5th edition, 1998, The definitive developer's guide to the Windows 98 API. The book goes through the classic application development cycle and explanation of features.
January 30, 2018
On Monday, 29 January 2018 at 22:55:12 UTC, I Lindström wrote:
> Hello all!
>
> I've been doing console apps for about a year and a half now, but my requirements are reaching the limits of easy to use with ASCII-based UI and typed commands so I'm thinking of moving into GUI-era with my projects. I was wondering if some one could help me into the right direction. I've been Googling a ton these past few days for some kind of a book or a course on how to code desktop applications for Windows, but either there isn't one, or it's very well hidden. I've found bits and pieces but nothing to give me a coherent approach.
>
> The other way I've been thinking is to do the thing browser-based, but for some reason that doesn't feel right.

You may have a look at Delta
https://forum.dlang.org/post/hpodoabutuakfxbzzcyy@forum.dlang.org

It is a solution to write a gui application using all the benefits Embarcadero Delphi RAD Studio gives you, while all of your coding is written in D.

Kind regards
Andre
13
January 30, 2018
On Tuesday, 30 January 2018 at 05:56:51 UTC, DanielG wrote:
> There are far too many options for Windows GUI programming, so we probably need a bit more information about any constraints that are important to you.
>
> For example:
>
> - do you specifically want something that works well with D? or are you open to other languages?
>
> - are you just wanting to learn desktop programming in general? (Like the concepts involved) Or do you have a specific thing you want to create?
>
> I would personally suggest Delphi to somebody who wants to write Windows desktop apps and learn about event-driven development, howeverrr the language (Object Pascal) is insufferably archaic compared to something like D. But it is definitely the cleanest, least-overwhelming method of writing native Win32 applications for somebody with no prior experience.
>
> Then there's all the modern Microsoft stuff (WPF/XAML/WinRT/etc), but you pretty much have to use either .NET or C++ for that.

I have a specific thing I want to create and I could do it in a console but it'd be very clunky to use, but at the moment I need to learn the basic stuff for this. I'd like to use D as I've grown quite fond of it after my earlier attempts at first Perl, then Python, C++ and now D for the past year and a half. For some reason D feels the most... homey and comfortable of the languages I've tried.
January 30, 2018
On Tuesday, 30 January 2018 at 12:30:36 UTC, rjframe wrote:
>
> VS release builds compile to native now by default; for easy Windows programming, you really can't beat C# and drawing the GUI (Windows Forms, not necessarily the new stuff). If the OP wants to learn what's needed for more complex GUI tasks (like for most non-simple applications), learning to build a GUI from source is kind of necessary though.
>

I've been looking into C# and VS2017 today along with VisualD. Reading through all this it looks like the simplest path is to learn C# and VS and go from there. I've found a pile of courses on LinkedIn that seem to build up to what I need. What makes me sad is that I have to drop D for at least the time being.
January 30, 2018
On Tuesday, 30 January 2018 at 18:41:57 UTC, I Lindström wrote:
> On Tuesday, 30 January 2018 at 05:56:51 UTC, DanielG wrote:
>> There are far too many options for Windows GUI programming, so we probably need a bit more information about any constraints that are important to you.
>>
>> For example:
>>
>> - do you specifically want something that works well with D? or are you open to other languages?
>>
>> - are you just wanting to learn desktop programming in general? (Like the concepts involved) Or do you have a specific thing you want to create?
>>
>> I would personally suggest Delphi to somebody who wants to write Windows desktop apps and learn about event-driven development, howeverrr the language (Object Pascal) is insufferably archaic compared to something like D. But it is definitely the cleanest, least-overwhelming method of writing native Win32 applications for somebody with no prior experience.
>>
>> Then there's all the modern Microsoft stuff (WPF/XAML/WinRT/etc), but you pretty much have to use either .NET or C++ for that.
>
> I have a specific thing I want to create and I could do it in a console but it'd be very clunky to use, but at the moment I need to learn the basic stuff for this. I'd like to use D as I've grown quite fond of it after my earlier attempts at first Perl, then Python, C++ and now D for the past year and a half. For some reason D feels the most... homey and comfortable of the languages I've tried.

There is a D GUI library called DlangUI at https://github.com/buggins/dlangui. The README file show some basic examples on how to use it. More demo apps are in the "examples" folder. Looking through those examples can really help. It works on windows and will work on Mac and Linux too. I use it on Linux and its quite impressive.

Some people here have used it to develop commercial softwares. I'm in a process of learning and creating a much nicer theme for it. Not much progress for now.
January 31, 2018
On Tuesday, 30 January 2018 at 18:52:18 UTC, I Lindström wrote:
> I've been looking into C# and VS2017 today along with VisualD. Reading through all this it looks like the simplest path is to learn C# and VS and go from there. I've found a pile of courses on LinkedIn that seem to build up to what I need. What makes me sad is that I have to drop D for at least the time being.

The good news is after you learn the basics of WinForms in C#, you can take DFL and have basically all the same code in D. DFL (D Forms Library) is a pure D thin wrapper around WinAPI that looks like an identical twin of WinForms. There was even some visual forms builder for it. And then, once you're familiar with this kind of GUI lib, it's not hard to learn DlangUI or GtkD or some other libraries mentioned above.
D does have GUI libs, just not books and courses about them.
January 31, 2018
On Monday, 29 January 2018 at 22:55:12 UTC, I Lindström wrote:
> Hello all!
>
> I've been doing console apps for about a year and a half now, but my requirements are reaching the limits of easy to use with ASCII-based UI and typed commands so I'm thinking of moving into GUI-era with my projects. I was wondering if some one could help me into the right direction. I've been Googling a ton these past few days for some kind of a book or a course on how to code desktop applications for Windows, but either there isn't one, or it's very well hidden. I've found bits and pieces but nothing to give me a coherent approach.
>
> The other way I've been thinking is to do the thing browser-based, but for some reason that doesn't feel right.

On Windows platform, WPF is the way to go right now. Once you accommodate yourself with XAML (descriptive language for designing windows and controls), you can step up from WPF to modern Windows apps (UWP). Unfortunately, none of these technologies are supported in D.

WinAPI is for masochistic people, WinForms is obsolete.

But we are leaving in the everything-is-an-web-app era, therefore don't dismiss the idea of an web application. I don't like them either.


January 31, 2018
On Wednesday, 31 January 2018 at 11:52:20 UTC, rumbu wrote:
> On Windows platform, WPF is the way to go right now. Once you accommodate yourself with XAML (descriptive language for designing windows and controls), you can step up from WPF to modern Windows apps (UWP). Unfortunately, none of these technologies are supported in D.

Just to say that it is actually possible to write modern Windows apps in D - I've done it. WinRT is just COM. Granted it's not as easy as using Microsoft's language projections, but it's doable if you really want to.
January 31, 2018
On Tuesday, 30 January 2018 at 18:52:18 UTC, I Lindström wrote:
> On Tuesday, 30 January 2018 at 12:30:36 UTC, rjframe wrote:
>>
>> VS release builds compile to native now by default; for easy Windows programming, you really can't beat C# and drawing the GUI (Windows Forms, not necessarily the new stuff). If the OP wants to learn what's needed for more complex GUI tasks (like for most non-simple applications), learning to build a GUI from source is kind of necessary though.
>>
>
> I've been looking into C# and VS2017 today along with VisualD. Reading through all this it looks like the simplest path is to learn C# and VS and go from there. I've found a pile of courses on LinkedIn that seem to build up to what I need. What makes me sad is that I have to drop D for at least the time being.

As other have said, WPF and C# is the way to go for Windows GUI programming, but you don't necessarily need to drop D. You could write your interface code in VS and have it call your D library via pinvoke (Platform Invoke). To make this work you must mark your public D functions with extern(C). Read the documentation on extern(C) and PInvoke.

Honestly, I don't know why more people don't do this. It really seems to be like the best of both worlds, as C# + WPF is king for Windows GUI and D is king for library development. The only drawback I can think of is you have to expose your awesome D library via a dumped down C interface.


January 31, 2018
On Wednesday, 31 January 2018 at 12:25:36 UTC, John Chapman wrote:
> Just to say that it is actually possible to write modern Windows apps in D - I've done it. WinRT is just COM. Granted it's not as easy as using Microsoft's language projections, but it's doable if you really want to.

The .winmd files describing the WinRT API surface are machine-readable, so in theory some enterprising D developer should be able to generate an elegant D projection. But as with many things, there might not be much overlap between "those who can" and "those who want to" :P

It's certainly beyond my skill level at the moment ...