It occurred to me the other day that Chat GPT might be able to convert a C# WinForms form to HTML, or at least it would be interesting to try. ChatGPT 4o[^] seems to be a bit improved over ChatGPT 4. I would not be surprised others have tried the same. So, I created a simple Windows Form, with some labels, textboxes, a drop-down list, a checkbox and a button. I then uploaded the contents of the Form1.cs, Form1.designer.cs, and Form1.resx files to the chat, and asked it to return the code for an HTML page. I also asked it to return a Blazor razor component page. It did a pretty good job. Not perfect, but for trying to convert the UI portion of a WinForms application, it could save time from simply manually doing the conversion. I did not try anything complicated, and I would not expect it to translate the C# code to code for Blazor, but I plan to experiment further. Since this forum is not for programming questions, I am hesitant to provide files, but you should be able to replicate the process yourself. For those interested, it might make an interesting thread.
Member 16239143
Posts
-
Windows Forms to HTML and Blazor using ChatGPT 4o -
Do americans not use the metric system because ...I like the pun. :) Americans have used the metric systems for many decades. In my rural, Southern, high school, way back in the ancient late 1960s/early 1970s, we learned metric units. In Naval Nuclear Power School, we used both metric and Imperial units, as appropriate. Given the daily use, mentally converting between the two was quite easy (repetition is a good teacher). European nations shifted to metric (which makes sense since they have such interdependencies, are geographically close, and together were not the dominant manufacturing engine that the US was). The US did not have that kind of pressure to change radically. Instead, Americans simply did what has been a part of our culture going back before our founding as a nation - we adapt to current needs and overcome whatever obstacles they present. Americans use metric when they need or want to, and Imperial when they need or want to. And we are reluctant to change for change's sake.