Приложение windows forms net framework и windows forms

Best practice is to choose «Windows Forms App» for new development.

Visual Studio gives developers the option of creating projects based on .NET Framework or .NET Core. Both have been superseded with the release of .NET 5. Developers still have the option to create projects with the .NET Framework, which is why there are two project types.

.NET Framework is older than .NET Core, and runs on Windows only. .NET Core was created to be cross-platform, and originally did not support Windows desktop apps. They had separate releases through .NET Framework 4.8 and .NET Core 3.1.

When .NET Core 3.0 was released, Microsoft began recommending that new applications, regardless of what type, be developed with .NET Core. Microsoft also announced that there would be no further major update to the .NET Framework:

With the .NET Core 3.0 release in September 2019 we think that all new .NET applications should be based on .NET Core. The primary application types from .NET Framework are supported, and where we did not port something over there is a recommended modern replacement. All future investment in .NET will be in .NET Core.

.NET Framework 4.8 will be the last major version of .NET Framework.

Source: .NET Core is the Future of .NET

Further, .NET 5 is the successor of .NET Core and .NET Framework. From now on, there’s just .NET:

There will be just one .NET going forward, and you will be able to use it to target Windows, Linux, macOS, iOS, Android, tvOS, watchOS and WebAssembly and more.

Source: Introducing .NET 5.

  • #1

In Visual Studio 2019 there are two template types called:

  • Windows Forms App
    • A project template for creating .NET Windows Forms (Winforms)
  • Windows Forms App (.NET Framework)
    • A project for creating an application with a Windows Forms (Winforms) user interface

Is the only difference where one target’s .NET and the other does not? Or iis that not the difference, but some other difference?

Thank you?

JohnH


  • JohnH

    JohnH

First is latest and greatest .Net 5 (or .Net Core 3.1 if you choose), it may not be fully working with all features/designers yet, but it’s the road ahead.
Second is good old .Net Framework 4.8, a well established working platform since beginning of .Net. Discontinued, there will be no further development for .Net Framework.

JohnH


  • #2

First is latest and greatest .Net 5 (or .Net Core 3.1 if you choose), it may not be fully working with all features/designers yet, but it’s the road ahead.
Second is good old .Net Framework 4.8, a well established working platform since beginning of .Net. Discontinued, there will be no further development for .Net Framework.

  • #3

John,

Thanks for your reply. That clears it up!

Greg

  • #4

typical microsoft — surely when they did some UAT someone asked the same question and instead of taking 5 seconds to make it clear they just couldn’t be bothered.

JohnH


  • #5

I understand how MS is pushing the new as default, and marks the old project types «.Net framework». The new project types also supports several versions, .Net Core as well as the new .Net Core based .Net 5 and .Net 6 versions, you’re asked to select version when creating the project, so I also understand why they are not marking those projects specifically.

Best practice is to choose «Windows Forms App» for new development.

Visual Studio gives developers the option of creating projects based on .NET Framework or .NET Core. Both have been superseded with the release of .NET 5. Developers still have the option to create projects with the .NET Framework, which is why there are two project types.

.NET Framework is older than .NET Core, and runs on Windows only. .NET Core was created to be cross-platform, and originally did not support Windows desktop apps. They had separate releases through .NET Framework 4.8 and .NET Core 3.1.

When .NET Core 3.0 was released, Microsoft began recommending that new applications, regardless of what type, be developed with .NET Core. Microsoft also announced that there would be no further major update to the .NET Framework:

With the .NET Core 3.0 release in September 2019 we think that all new .NET applications should be based on .NET Core. The primary application types from .NET Framework are supported, and where we did not port something over there is a recommended modern replacement. All future investment in .NET will be in .NET Core.

.NET Framework 4.8 will be the last major version of .NET Framework.

Source: .NET Core is the Future of .NET

Further, .NET 5 is the successor of .NET Core and .NET Framework. From now on, there’s just .NET:

There will be just one .NET going forward, and you will be able to use it to target Windows, Linux, macOS, iOS, Android, tvOS, watchOS and WebAssembly and more.

Source: Introducing .NET 5.

Я использую VS2019 и хочу создать приложение WinForm. В чем разница между приложением Windows Form и приложением формы Windows (.NET Framework) и каким из этих 2 вариантов я должен выбрать?

Image

2 ответа

Лучший ответ

Речь идет о разных версиях .NET и .NET Framework, вы можете решить, какая из них подходит для того, что вы хотите построить:

Разработчики используют .NET Framework для создания настольных приложений Windows и серверных приложений. Сюда входят веб-приложения ASP.NET. .NET используется для создания приложений, которые могут работать в Windows, Linux и Mac. Он не поддерживает создание настольных приложений Windows на платформах, отличных от Windows. Разработчики могут писать приложения и библиотеки на VB.NET, C# и F# в обеих средах выполнения.

Что есть в .NET, чего нет в .NET Framework? .NET получит новые функции и улучшения во время выполнения. У него более высокая производительность, и он может одновременно развертывать разные версии .NET на одном компьютере, создавать автономные приложения и быть полностью независимым от среды, в которой вы работаете, и т. д.

Что есть в .NET Framework, чего нет в .NET? У него есть старый API, который не будет перенесен в .NET. И как вы выбираете для своих новых приложений выбираете .NET для своих приложений, которые находятся только в режиме обслуживания и вся разработка завершена вы не хотите трогать этот код совершенно безопасно оставить их на .NET Framework и для существующих приложения, которые нацелены на .NET Framework, но находятся в активной разработке, вы можете позвонить, если они переместят их на .NET или оставят на платформе, вы можете оценить преимущества и стоимость переноса и принять решение, которое лучше всего подходит для вашего приложения.

если вы хотите использовать новейшие языковые функции и улучшения среды выполнения, вам следует выбрать ядро ​​dotnet

Вы также можете посмотреть на следующую ссылку:

  • .NET Core против .NET Framework
  • .NET CORE и .NET Framework — что выбрать? |. Рабочий стол и .NET CORE 101


1

RussKie
19 Июн 2021 в 15:41

Когда вы создаете новый проект, вы видите (.Net Framework), что означает, что он работает только под ОС Windows и создает приложения только для окон. Я считаю, что другой шаблон по умолчанию для .Net Core является кроссплатформенным, который работает в разных ОС.


2

KhailXpro
19 Июн 2021 в 15:48

  • #1

In Visual Studio 2019 there are two template types called:

  • Windows Forms App
    • A project template for creating .NET Windows Forms (Winforms)
  • Windows Forms App (.NET Framework)
    • A project for creating an application with a Windows Forms (Winforms) user interface

Is the only difference where one target’s .NET and the other does not? Or iis that not the difference, but some other difference?

Thank you?

JohnH

  • JohnH

    JohnH

  • Mar 30, 2021

First is latest and greatest .Net 5 (or .Net Core 3.1 if you choose), it may not be fully working with all features/designers yet, but it’s the road ahead.
Second is good old .Net Framework 4.8, a well established working platform since beginning of .Net. Discontinued, there will be no further development for .Net Framework.

JohnH

  • #2

First is latest and greatest .Net 5 (or .Net Core 3.1 if you choose), it may not be fully working with all features/designers yet, but it’s the road ahead.
Second is good old .Net Framework 4.8, a well established working platform since beginning of .Net. Discontinued, there will be no further development for .Net Framework.

  • #3

John,

Thanks for your reply. That clears it up!

Greg

  • #4

typical microsoft — surely when they did some UAT someone asked the same question and instead of taking 5 seconds to make it clear they just couldn’t be bothered.

JohnH

  • #5

I understand how MS is pushing the new as default, and marks the old project types «.Net framework». The new project types also supports several versions, .Net Core as well as the new .Net Core based .Net 5 and .Net 6 versions, you’re asked to select version when creating the project, so I also understand why they are not marking those projects specifically.

Skydiver

From Wikipedia, the free encyclopedia

This article needs to be updated. Please help update this article to reflect recent events or newly available information. (January 2023)

Windows Forms (WinForms)

Screenshot of Windows Forms designer as seen in Visual Studio 2019.
Other names WinForms
Original author(s) .NET: Microsoft,
Mono: Ximian/Novell
Developer(s) .NET Foundation
Initial release February 13, 2002; 21 years ago
Stable release

v5.0.17
/ May 11, 2022; 10 months ago

Repository
  • github.com/dotnet/winforms Edit this at Wikidata
Written in C#
Operating system Microsoft Windows
Platform .NET Framework, .NET, Mono
Type Software framework
License MIT License
Website docs.microsoft.com/en-us/dotnet/framework/winforms/

Windows Forms (WinForms) is a free and open-source graphical (GUI) class library included as a part of Microsoft .NET, .NET Framework or Mono,[1] providing a platform to write client applications for desktop, laptop, and tablet PCs.[2] While it is seen as a replacement for the earlier and more complex C++ based Microsoft Foundation Class Library, it does not offer a comparable paradigm[3] and only acts as a platform for the user interface tier in a multi-tier solution.[4]

At the Microsoft Connect event on December 4, 2018, Microsoft announced releasing Windows Forms as an open source project on GitHub. It is released under the MIT License. With this release, Windows Forms has become available for projects targeting the .NET Core framework. However, the framework is still available only on the Windows platform, and Mono’s incomplete implementation of Windows Forms remains the only cross-platform implementation.[5][6]

Architecture[edit]

A Windows Forms application is an event-driven application supported by Microsoft’s .NET Framework. Unlike a batch program, it spends most of its time simply waiting for the user to do something, such as fill in a text box or click a button. The code for the application can be written in a .NET programming language such as C# or Visual Basic.

Windows Forms provides access to native Windows User Interface Common Controls by wrapping the existent Windows API in managed code.[7] With the help of Windows Forms, the .NET Framework provides a more comprehensive abstraction above the Win32 API than Visual Basic or MFC did.[8]

Windows Forms is similar to Microsoft Foundation Class (MFC) library in developing client applications. It provides a wrapper consisting of a set of C++ classes for development of Windows applications. However, it does not provide a default application framework like the MFC. Every control in a Windows Forms application is a concrete instance of a class.

Features[edit]

All visual elements in the Windows Forms class library derive from the Control class. This provides the minimal functionality of a user interface element such as location, size, color, font, text, as well as common events like click and drag/drop. The Control class also has docking support to let a control rearrange its position under its parent. The Microsoft Active Accessibility support in the Control class also helps impaired users to use Windows Forms better.[9]

In Visual Studio, forms are created using drag-and-drop techniques. A tool is used to place controls (e.g., text boxes, buttons, etc.) on the form (window). Controls have attributes and event handlers associated with them. Default values are provided when the control is created, but may be changed by the programmer. Many attribute values can be modified during run time based on user actions or changes in the environment, providing a dynamic application. For example, code can be inserted into the form resize event handler to reposition a control so that it remains centered on the form, expands to fill up the form, etc. By inserting code into the event handler for a keypress in a text box, the program can automatically translate the case of the text being entered, or even prevent certain characters from being inserted.

Besides providing access to native Windows controls like button, textbox, checkbox and listview, Windows Forms added its own controls for ActiveX hosting, layout arrangement, validation and rich data binding. Those controls are rendered using GDI+.[9]

History and future[edit]

Just like Abstract Window Toolkit (AWT), the equivalent Java API, Windows Forms was an early and easy way to provide graphical user interface components to the .NET Framework. Windows Forms is built on the existing Windows API and some controls merely wrap underlying Windows components.[10] Some of the methods allow direct access to Win32 callbacks, which are not available in non-Windows platforms.[10]

In .NET Framework 2.0, Windows Forms gained richer layout controls, Office 2003 style toolstrip controls, multithreading component, richer design-time and data binding support as well as ClickOnce for web-based deployment.[11][12]

With the release of .NET 3.0, Microsoft released a second, parallel API for rendering GUIs: Windows Presentation Foundation (WPF) based on DirectX,[13] together with a GUI declarative language called XAML.[14]

During a question-and-answer session at the Build 2014 Conference, Microsoft explained that Windows Forms was under maintenance mode, with no new features being added, but bugs found would still be fixed.[15] Most recently, improved high-DPI support for various Windows Forms controls was introduced in updates to .NET Framework version 4.5.[16]

XAML backwards compatibility with Windows Forms[edit]

For future development, Microsoft has succeeded Windows Forms with an XAML-based GUI entry using frameworks such as WPF and UWP. However, drag and drop placement of GUI components in a manner similar to Windows Forms is still provided in XAML by replacing the root XAML element of the Page/Window with a «Canvas» UI-Control. When making this change, the user can build a window in a similar fashion as in Windows Forms by directly dragging and dropping components using the Visual Studio GUI.

While XAML provides drag and drop placement backwards compatibility through the Canvas Control, XAML Controls are only similar to Windows Forms Controls and are not one-to-one backwards compatible. They perform similar functions and have a similar appearance, but the properties and methods are different enough to require remapping from one API to another.

Alternative implementation[edit]

Mono is a project led by Xamarin (formerly by Ximian, then Novell) to create an Ecma standard compliant .NET Framework compatible set of tools.

In 2011, Mono’s support for System.Windows.Forms as of .NET 2.0 was announced as complete;[17]
System.Windows.Forms 2.0 works natively on Mac OS X.[18]
However, System.Windows.Forms has not been actively developed on Mono.[19]
Full compatibility with .NET was not possible, because Microsoft’s System.Windows Forms is mainly a wrapper around the Windows API, and some of the methods allow direct access to Win32 callbacks, which are not available in platforms other than Windows.[10]
A more significant problem is that, since version 5.2,[20]
Mono has been upgraded so that its default is to assume a 64 bit platform.
However, System.Windows.Forms on Mono for the Macintosh OS X platform has been built using a 32 bit subsystem, Carbon.[21]
As of this date[when?], a 64-bit version of System.Windows.Forms for use on Mac OS X remains unavailable and only .NET applications built for the 32 bit platform can be expected to execute.

See also[edit]

  • Microsoft Visual Studio
  • ClickOnce
  • Abstract Window Toolkit (AWT), the equivalent GUI application programming interface (API) for the Java programming language
  • Visual Component Library (VCL) from Borland
  • Visual Test, test automation

References[edit]

  1. ^ Sells, Chris (September 6, 2003). Windows Forms Programming in C# (1st ed.). Addison-Wesley Professional. p. xxxviiii.
  2. ^ «Design and Implementation Guidelines for Web Clients by Microsoft Pattern and Practices». Microsoft. November 2003.
  3. ^ Sells, Chris; Weinhardt, Michael (May 16, 2006). «Appendix B». Moving from MFC, Windows Forms 2.0 Programming (2nd ed.). Addison-Wesley Professional.
  4. ^ «Introduction to Windows Forms» (Visual Studio 2003 documentation). Microsoft 2003.
  5. ^ Martin, Jeff (4 December 2018). «Microsoft Open Sources WPF, WinForms, and WinUI». InfoQ. Retrieved 2018-12-06.
  6. ^ Hanselman, Scott (4 December 2018). «Announcing WPF, WinForms, and WinUI are going Open Source». Retrieved 2018-12-06.
  7. ^ De Smet, Bart (January 4, 2011). «Chapter 5». C# 4.0 Unleashed. Sams Publishing.
  8. ^ Griffiths, Ian; Adams, Matthew (March 2003). NET Windows Forms in a Nutshell. O’Reilly Media. p. 4.
  9. ^ a b Griffiths, Ian; Adams, Matthew (March 2003). NET Windows Forms in a Nutshell. O’Reilly Media. pp. 27–53.
  10. ^ a b c «FAQ: Winforms». mono-project.com. It is very unlikely that the implementation will ever implement everything needed for full compatibility with Windows.Forms. The reason is that Windows.Forms is not a complete toolkit, and to work around this problem some of the underlying Win32 foundation is exposed to the programmer in the form of exposing the Windows message handler
  11. ^ Sells, Chris; Weinhardt, Michael (May 16, 2006). «Appendix A. What s New in Windows Forms 2.0». Windows Forms 2.0 Programming (2nd ed.). Addison-Wesley Professional.
  12. ^ Noyes, Brian (January 12, 2006). «Preface». Data Binding with Windows Forms 2.0: Programming Smart Client Data Applications with .NET (1st ed.). Addison-Wesley Professional.
  13. ^ Hall, Gary (December 27, 2010). «DirectX, not GDI+». Pro WPF and Silverlight MVVM: Effective Application Development with Model (2010 ed.). Apress. p. 2.
  14. ^ Smith, Josh (2007-09-05). «WPF vs. Windows Forms». Josh Smith on WPF. Retrieved 2011-08-25. WPF is not intended to replace Windows Forms. […] Windows Forms is still alive and well, and will continue to be enhanced and supported by Microsoft for years to come. WPF is simply another tool for Windows desktop application developers to use, when appropriate.
  15. ^ «A WPF Q&A». infoq.com. 2014-04-03. Retrieved 2014-04-21. Windows Forms is continuing to be supported, but in maintenance mode. They will fix bugs as they are discovered, but new functionality is off the table
  16. ^ Allen, Jonathan (2014-05-06). «High DPI Improvements for Windows Forms in .NET 4.5.2». InfoQ. Retrieved 2015-02-10.
  17. ^ «WinForms». mono-project.com. Retrieved 2011-07-30. Support for Windows Forms 2.0 is complete. At this point, we are largely just fixing bugs and polishing our code.
  18. ^ «WinForms». mono-project.com. Retrieved 2011-07-30. Does Winforms run on OSX? Yes, as of Mono 1.9, Winforms has a native OSX driver that it uses by default
  19. ^ de Icaza, Miguel (2011-03-07). «GDC 2011». Retrieved 2011-07-30. For tools that are mostly OpenGL/DirectX based, use Windows.Forms, keeping in mind that some bug fixing or work around on their part might be needed as our Windows.Forms is not actively developed.
  20. ^ «Introduction to Mono on macOS». mono-project.com. Retrieved 2019-11-12.
  21. ^ Martin, Jess. «Windows.Forms Comes to 64-bit Mac OS X». Retrieved 2019-11-12.

External links[edit]

  • MSDN: Building Windows Forms applications
  • MSDN : Windows.Forms reference documentation
  • MSDN : Windows Forms Technical Articles — Automating Windows Form with Visual Test

From Wikipedia, the free encyclopedia

This article needs to be updated. Please help update this article to reflect recent events or newly available information. (January 2023)

Windows Forms (WinForms)

Screenshot of Windows Forms designer as seen in Visual Studio 2019.
Other names WinForms
Original author(s) .NET: Microsoft,
Mono: Ximian/Novell
Developer(s) .NET Foundation
Initial release February 13, 2002; 21 years ago
Stable release

v5.0.17
/ May 11, 2022; 10 months ago

Repository
  • github.com/dotnet/winforms Edit this at Wikidata
Written in C#
Operating system Microsoft Windows
Platform .NET Framework, .NET, Mono
Type Software framework
License MIT License
Website docs.microsoft.com/en-us/dotnet/framework/winforms/

Windows Forms (WinForms) is a free and open-source graphical (GUI) class library included as a part of Microsoft .NET, .NET Framework or Mono,[1] providing a platform to write client applications for desktop, laptop, and tablet PCs.[2] While it is seen as a replacement for the earlier and more complex C++ based Microsoft Foundation Class Library, it does not offer a comparable paradigm[3] and only acts as a platform for the user interface tier in a multi-tier solution.[4]

At the Microsoft Connect event on December 4, 2018, Microsoft announced releasing Windows Forms as an open source project on GitHub. It is released under the MIT License. With this release, Windows Forms has become available for projects targeting the .NET Core framework. However, the framework is still available only on the Windows platform, and Mono’s incomplete implementation of Windows Forms remains the only cross-platform implementation.[5][6]

Architecture[edit]

A Windows Forms application is an event-driven application supported by Microsoft’s .NET Framework. Unlike a batch program, it spends most of its time simply waiting for the user to do something, such as fill in a text box or click a button. The code for the application can be written in a .NET programming language such as C# or Visual Basic.

Windows Forms provides access to native Windows User Interface Common Controls by wrapping the existent Windows API in managed code.[7] With the help of Windows Forms, the .NET Framework provides a more comprehensive abstraction above the Win32 API than Visual Basic or MFC did.[8]

Windows Forms is similar to Microsoft Foundation Class (MFC) library in developing client applications. It provides a wrapper consisting of a set of C++ classes for development of Windows applications. However, it does not provide a default application framework like the MFC. Every control in a Windows Forms application is a concrete instance of a class.

Features[edit]

All visual elements in the Windows Forms class library derive from the Control class. This provides the minimal functionality of a user interface element such as location, size, color, font, text, as well as common events like click and drag/drop. The Control class also has docking support to let a control rearrange its position under its parent. The Microsoft Active Accessibility support in the Control class also helps impaired users to use Windows Forms better.[9]

In Visual Studio, forms are created using drag-and-drop techniques. A tool is used to place controls (e.g., text boxes, buttons, etc.) on the form (window). Controls have attributes and event handlers associated with them. Default values are provided when the control is created, but may be changed by the programmer. Many attribute values can be modified during run time based on user actions or changes in the environment, providing a dynamic application. For example, code can be inserted into the form resize event handler to reposition a control so that it remains centered on the form, expands to fill up the form, etc. By inserting code into the event handler for a keypress in a text box, the program can automatically translate the case of the text being entered, or even prevent certain characters from being inserted.

Besides providing access to native Windows controls like button, textbox, checkbox and listview, Windows Forms added its own controls for ActiveX hosting, layout arrangement, validation and rich data binding. Those controls are rendered using GDI+.[9]

History and future[edit]

Just like Abstract Window Toolkit (AWT), the equivalent Java API, Windows Forms was an early and easy way to provide graphical user interface components to the .NET Framework. Windows Forms is built on the existing Windows API and some controls merely wrap underlying Windows components.[10] Some of the methods allow direct access to Win32 callbacks, which are not available in non-Windows platforms.[10]

In .NET Framework 2.0, Windows Forms gained richer layout controls, Office 2003 style toolstrip controls, multithreading component, richer design-time and data binding support as well as ClickOnce for web-based deployment.[11][12]

With the release of .NET 3.0, Microsoft released a second, parallel API for rendering GUIs: Windows Presentation Foundation (WPF) based on DirectX,[13] together with a GUI declarative language called XAML.[14]

During a question-and-answer session at the Build 2014 Conference, Microsoft explained that Windows Forms was under maintenance mode, with no new features being added, but bugs found would still be fixed.[15] Most recently, improved high-DPI support for various Windows Forms controls was introduced in updates to .NET Framework version 4.5.[16]

XAML backwards compatibility with Windows Forms[edit]

For future development, Microsoft has succeeded Windows Forms with an XAML-based GUI entry using frameworks such as WPF and UWP. However, drag and drop placement of GUI components in a manner similar to Windows Forms is still provided in XAML by replacing the root XAML element of the Page/Window with a «Canvas» UI-Control. When making this change, the user can build a window in a similar fashion as in Windows Forms by directly dragging and dropping components using the Visual Studio GUI.

While XAML provides drag and drop placement backwards compatibility through the Canvas Control, XAML Controls are only similar to Windows Forms Controls and are not one-to-one backwards compatible. They perform similar functions and have a similar appearance, but the properties and methods are different enough to require remapping from one API to another.

Alternative implementation[edit]

Mono is a project led by Xamarin (formerly by Ximian, then Novell) to create an Ecma standard compliant .NET Framework compatible set of tools.

In 2011, Mono’s support for System.Windows.Forms as of .NET 2.0 was announced as complete;[17]
System.Windows.Forms 2.0 works natively on Mac OS X.[18]
However, System.Windows.Forms has not been actively developed on Mono.[19]
Full compatibility with .NET was not possible, because Microsoft’s System.Windows Forms is mainly a wrapper around the Windows API, and some of the methods allow direct access to Win32 callbacks, which are not available in platforms other than Windows.[10]
A more significant problem is that, since version 5.2,[20]
Mono has been upgraded so that its default is to assume a 64 bit platform.
However, System.Windows.Forms on Mono for the Macintosh OS X platform has been built using a 32 bit subsystem, Carbon.[21]
As of this date[when?], a 64-bit version of System.Windows.Forms for use on Mac OS X remains unavailable and only .NET applications built for the 32 bit platform can be expected to execute.

See also[edit]

  • Microsoft Visual Studio
  • ClickOnce
  • Abstract Window Toolkit (AWT), the equivalent GUI application programming interface (API) for the Java programming language
  • Visual Component Library (VCL) from Borland
  • Visual Test, test automation

References[edit]

  1. ^ Sells, Chris (September 6, 2003). Windows Forms Programming in C# (1st ed.). Addison-Wesley Professional. p. xxxviiii.
  2. ^ «Design and Implementation Guidelines for Web Clients by Microsoft Pattern and Practices». Microsoft. November 2003.
  3. ^ Sells, Chris; Weinhardt, Michael (May 16, 2006). «Appendix B». Moving from MFC, Windows Forms 2.0 Programming (2nd ed.). Addison-Wesley Professional.
  4. ^ «Introduction to Windows Forms» (Visual Studio 2003 documentation). Microsoft 2003.
  5. ^ Martin, Jeff (4 December 2018). «Microsoft Open Sources WPF, WinForms, and WinUI». InfoQ. Retrieved 2018-12-06.
  6. ^ Hanselman, Scott (4 December 2018). «Announcing WPF, WinForms, and WinUI are going Open Source». Retrieved 2018-12-06.
  7. ^ De Smet, Bart (January 4, 2011). «Chapter 5». C# 4.0 Unleashed. Sams Publishing.
  8. ^ Griffiths, Ian; Adams, Matthew (March 2003). NET Windows Forms in a Nutshell. O’Reilly Media. p. 4.
  9. ^ a b Griffiths, Ian; Adams, Matthew (March 2003). NET Windows Forms in a Nutshell. O’Reilly Media. pp. 27–53.
  10. ^ a b c «FAQ: Winforms». mono-project.com. It is very unlikely that the implementation will ever implement everything needed for full compatibility with Windows.Forms. The reason is that Windows.Forms is not a complete toolkit, and to work around this problem some of the underlying Win32 foundation is exposed to the programmer in the form of exposing the Windows message handler
  11. ^ Sells, Chris; Weinhardt, Michael (May 16, 2006). «Appendix A. What s New in Windows Forms 2.0». Windows Forms 2.0 Programming (2nd ed.). Addison-Wesley Professional.
  12. ^ Noyes, Brian (January 12, 2006). «Preface». Data Binding with Windows Forms 2.0: Programming Smart Client Data Applications with .NET (1st ed.). Addison-Wesley Professional.
  13. ^ Hall, Gary (December 27, 2010). «DirectX, not GDI+». Pro WPF and Silverlight MVVM: Effective Application Development with Model (2010 ed.). Apress. p. 2.
  14. ^ Smith, Josh (2007-09-05). «WPF vs. Windows Forms». Josh Smith on WPF. Retrieved 2011-08-25. WPF is not intended to replace Windows Forms. […] Windows Forms is still alive and well, and will continue to be enhanced and supported by Microsoft for years to come. WPF is simply another tool for Windows desktop application developers to use, when appropriate.
  15. ^ «A WPF Q&A». infoq.com. 2014-04-03. Retrieved 2014-04-21. Windows Forms is continuing to be supported, but in maintenance mode. They will fix bugs as they are discovered, but new functionality is off the table
  16. ^ Allen, Jonathan (2014-05-06). «High DPI Improvements for Windows Forms in .NET 4.5.2». InfoQ. Retrieved 2015-02-10.
  17. ^ «WinForms». mono-project.com. Retrieved 2011-07-30. Support for Windows Forms 2.0 is complete. At this point, we are largely just fixing bugs and polishing our code.
  18. ^ «WinForms». mono-project.com. Retrieved 2011-07-30. Does Winforms run on OSX? Yes, as of Mono 1.9, Winforms has a native OSX driver that it uses by default
  19. ^ de Icaza, Miguel (2011-03-07). «GDC 2011». Retrieved 2011-07-30. For tools that are mostly OpenGL/DirectX based, use Windows.Forms, keeping in mind that some bug fixing or work around on their part might be needed as our Windows.Forms is not actively developed.
  20. ^ «Introduction to Mono on macOS». mono-project.com. Retrieved 2019-11-12.
  21. ^ Martin, Jess. «Windows.Forms Comes to 64-bit Mac OS X». Retrieved 2019-11-12.

External links[edit]

  • MSDN: Building Windows Forms applications
  • MSDN : Windows.Forms reference documentation
  • MSDN : Windows Forms Technical Articles — Automating Windows Form with Visual Test

Чтобы
создать GUI приложения в Microsoft .NET нужно
использовать Windows Forms. Windows Forms — новый
стиль построения приложения на базе
классов .NET Framework class library. Они имеют
собственную модель программирования,
которая более совершеннее, чем модели,
основанные на Win32 API или MFC, и они выполняются
в управляемой среде .NET Common Language Runtime
(CLR). Эта статья дает представление о
том, что такое Windows Forms, рассматривая ее
от модели программирования до Microsoft
Intermediate Language и JIT-транслятора.

Вы
уже много слышали, что Microsoft .NET — новая
платформа, которая основана на Windows. Это
целая новая парадигма программирования,
которая изменит путь, которым вы сейчас
думаете о написании программ для Windows.
Она реализована на библиотеке классов
.NET Framework class library и содержит более единую
модель программирования, улучшенную
защиту и более богатые возможности для
написания полнофункциональных
веб-приложений. И это только начало.

Windows
Forms — одна из наиболее интересных
возможностей Microsoft .NET. Если вы знакомы
с MFC (или Windows API), то Windows Forms хорошее начало
для работы с .NET Framework class library, потому что
она позволяет писать традиционные GUI
приложения с окнами, формами и т.п.
вещами. Однажды, начав работать с Windows
Forms вы сможете быстро понять .NET Framework.

Главная
выгода от написания Windows-приложений с
использованием Windows Forms — это то, что
Windows Forms гомогенизируют (создают более
однородную (гомогенную) структуру)
программную модель и устраняют многие
ошибки и противоречия от использования
Windows API. Например, каждый опытный
программист под Windows знает, что некоторые
стили окна могут применяться только к
окну, когда оно уже создано. Windows Forms в
значительной степени устраняют такое
противоречие. Если вы хотите существующему
окну задать стиль, который может быть
присвоен только в момент создания окна,
то Windows Forms спокойно уничтожит окно и
вновь создаст его с указанным стилем.
Кроме того, .NET Framework class library намного
более богаче, чем Windows API, и когда вы
будете писать приложения, используя
Windows Forms, вы получите в распоряжение
больше возможностей. Написание приложения
с использованием Windows Forms потребует
меньшего количества кода, чем приложения,
которые используют Windows API или MFC.

Другая
выгода от Windows Forms — вы используете тот
же самый API, независимо от языка
программирования, который вы выбрали.
В прошлом, выбор языка программирования
управлял выбором API. Если вы программировали
в Visual Basic, вы использовали один API
(реализованный на языке Visual Basic), в то
время как программисты C использовали
Win32 API, а программисты C++, вообще говоря,
использовали MFC. MFC-программисту было
трудно переключиться на Visual Basic и
наоборот. Но теперь такого больше нет.
Все приложения, которые используют
Windows Forms, используют один API из .NET Framework
class library. Знание одного API достаточно
позволит программисту писать приложения
фактически на любом языке, который он
выберет.

Windows
Forms ни как не меньше, чем современная
модель программирования для GUI приложений.
В отличие от модели программирования
Win32, в которой многое идет еще от Windows
1.0, новая модель была разработана с
учетом всех современных требований.
Цель этой статьи состоит в том, чтобы
познакомить читателя с моделью
программирования Windows Forms. Чтобы
компилировать и выполнять примеры кода,
приведенного далее, на вашем компьютере
должнен быть установлен пакет Microsoft
.NET Framework SDK (.NET Framework SDK Beta 1 доступен на
сайте Microsoft).

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]

  • #
  • #
  • #
  • #
  • #
  • #
  • #
  • #

    05.06.2015525.32 Кб254.docx

  • #
  • #
  • #

Я пытался использовать сторонний компонент, разработанный на С# в проекте VB.NET. Когда я попытался добавить компонент в панель инструментов, компоненты всегда были серыми — отключены. После долгих поисков по этой проблеме (например, один из многих: Элементы панели инструментов Visual Studio 2010 отключены или неактивны) Я обнаружил, что компоненты, вероятно, не включены, потому что они были созданы для другой вид проекта. Приведенный обычный пример — это «веб-приложение» и «приложение Windows».

Я посмотрел демонстрационный проект, который поставлялся вместе с компонентами, а тип вывода демонстрационного проекта — «Приложение Windows». Проект VB.NET, который я пытаюсь построить с помощью этого компонента, представляет собой «приложение Windows Forms». Поскольку это VS Express, это единственные типы приложений Windows, доступные в двух проектах.

Мой вопрос в том, в чем разница между этими двумя типами вывода? Оба типа вывода <OutputType>WinExe</OutputType> в файле проекта. Могу ли я перестроить компоненты для работы в «приложении Windows Forms», и если да, то как?

29 окт. 2013, в 22:35

Поделиться

Источник

3 ответа

Посмотрите здесь

В случае «Microsoft Windows» программы Windows являются программными приложениями, которые запускаются на компьютере, на котором также работает Microsoft Windows в качестве операционной системы. Программное приложение или программа представляет собой набор логических условий, сгруппированных вместе для выполнения некоторой функции. Обычно приложение Microsoft Windows запускается в «окне», хотя это не является обязательным требованием. «Окно» в контексте программного обеспечения представляет собой область экрана, выделенную для запуска отдельной программы, и может иметь или не иметь параметров для управления положением и размером области программы.
Некоторые примеры приложений Microsoft Windows:

  • Microsoft Excel
  • Microsoft Internet Explorer
  • Блокнот
  • Mozilla Firefox

и здесь другое сообщение

Windows * Формы * (WinForms) — это имя, указанное графическому интерфейсу программирования приложения (API), входящему в состав Microsoft.NET Framework, обеспечивающий доступ к собственным элементам интерфейса Microsoft Windows путем переноса существующего API Windows в управляемый код. Хотя это рассматривается как замена более ранней и более сложной библиотеки Microsoft Foundation Class на базе С++, она не предлагает парадигму, сравнимую с Model-View-Controller. Для обеспечения этой функциональности были созданы некоторые последующие и сторонние библиотеки. Наиболее широко используемым из них является блок приложений процесса пользовательского интерфейса, который выпускается группой моделей и практик Microsoft в виде бесплатной загрузки, которая включает исходный код для быстрого запуска.

также приложение Windows Application и приложение WPF (WPF — Windows Presentation Foundation) и приложение Windows Form

WPF — посмотреть здесь

Надеемся, что эта информация будет полезной для вас.

gbk
04 нояб. 2013, в 23:48

Поделиться

Из подсказки, данной @HighCore, я собираюсь предположить, что «приложение Windows» представляет собой WPF
приложения и что «приложение Windows Forms» является приложением WinForms, и оба они несовместимы.
Если бы кто-то мог дать более полный ответ, чем это было бы здорово.

GeezerGeek
04 нояб. 2013, в 22:28

Поделиться

Консольные приложения не имеют пользовательских интерфейсов и запускаются в командной строке. Приложения Windows Forms имеют пользовательские интерфейсы.

Это, наверное, самая большая разница.

Приложение формы Windows — это приложение, которое имеет графический интерфейс пользователя (GUI), такой как Visual С# IDE. С другой стороны, консольная программа представляет собой текстовое приложение. В консольном приложении нет элементарных элементов управления, таких как кнопки или текстовые поля, и они запускаются из командной строки.

Monika
30 окт. 2013, в 06:50

Поделиться

Ещё вопросы

  • 0Создать массив из пространственных элементов другого массива
  • 0HSQL-соединение исключение, соединение не существует
  • 1Ограничить обслуживание внутренней сети, НО балансировщик нагрузки?
  • 1Утверждение метатегов с помощью Selenium / webdriver (Java)
  • 0На файл .lib все еще ссылаются, когда тип проекта изменяется на dll
  • 0Ошибка аутентификации API Woocommerce
  • 1Как программно выполнить функцию Eclipse-> Refactor-> Rename для исходного кода Java?
  • 0MySQL история создания таблицы и запроса
  • 1Оптимизация Regex для больших списков
  • 1Можно ли поместить xml-файл макета в разные подкаталоги в Android?
  • 0MySQL СОЕДИНЯЕТ две таблицы и фильтр.
  • 0MySQL запрос на обновление, чтобы сохранить то же значение для дублирующейся записи и значение приращения для новой записи
  • 0Глобальное пространство имен не проверяется в других пространствах имен
  • 0Mysql TRIGGER синхронизировать 2 базы данных того же сервера
  • 0Расширить изображение на 100% за пределы родительского
  • 1Как я могу использовать сеанс в WebView в моем другом материале (Android)?
  • 0Как добавить поле по умолчанию —select— при использовании ng-options в angularjs
  • 0Расшифровать TripleDES с PHP на C # не получая те же результаты
  • 0Выделение дубликатов выбора в группе раскрывающихся списков
  • 0Объект указателя где-то поврежден
  • 1Несколько экземпляров одного и того же виджета Android: В любом случае, чтобы иметь особые предпочтения экземпляра?
  • 0Как получить 200+ сотен страниц в Silverstripe в одном запросе?
  • 1Spring 3.2 — AbstractAnnotationConfigDispatcherServletInitializer onStartup — добавление фильтра сервлета возвращает ноль
  • 1Java, как эффективно удалить элемент из списка
  • 0Изменить интерфейс пользователя при обратном вызове?
  • 0AngularJS Как отправить данные только один раз (быстро нажмите)
  • 0вызвать метод получения из запроса PHP
  • 0Перечислять принтеры на Mac
  • 0Класс Div, эквивалентный для Angular-Formly
  • 0Преобразование результата запроса MySQL в иерархические данные — D3
  • 0PHP preg_match, проверьте, определен ли язык в URL
  • 0Когда соединение сделано с ldap для PHP?
  • 0AngularJS добавляет дополнительную опцию к Zend Select
  • 0Формирование данных PHP с массивом с некоторым существующим значением
  • 0Функция не определена в JavaScript
  • 1Нахождение максимума строки в кадре данных и возвращение имени его столбца в пандах
  • 1Как очистить данные с сайта при выборе выпадающего списка?
  • 0Добавить текст в P или div при выборе переключателя
  • 1Asp.Net MVC C # не может неявно преобразовать тип проблемы
  • 0Передайте значение ввода автоматически с Javascript
  • 1повторять строки данных в зависимости от условия
  • 0Сьюзи-спан-столбцы Mis-alignment
  • 0Smarty если / еще с использованием параметров сообщения?
  • 0Какой лучший способ справиться с функцией в PHP?
  • 1Класс MonitoredHost отсутствует в jdk
  • 0Я хочу раздел автообновления для моего сайта
  • 0Как сделать, чтобы диалоговое окно выбора даты появлялось при переходе на поле даты
  • 1Как я могу добавить UpdatePanels к моему gridview в asp.net
  • 1Возможность замены ошибки возврата ключа матрицы в словаре с использованием Python
  • 0Своеобразное поведение при рекурсивном вызове функции в C ++ и получении двух разных выходных данных для одного и того же кода только с дополнительной строкой с «cout»

Сообщество Overcoder

I was trying to use a third-party component developed in C# in a VB.NET project. When I tried to add the component to the toolbox the components were always greyed out — disabled. After much searching on this problem (example, one of many: Visual Studio 2010 toolbox controls disabled or inactive) I found that the components were probably not enabled because they were created for a different sort of project. The usual example given is «web application» vs. «windows application».

I looked at the demo project that came with the components and the demo project output type is «Windows Application». The VB.NET project I’m trying to build using the component is a «Windows Forms Application». Since this is VS Express, these are the only Windows application types available in the two projects.

My question is, what is the difference between these two output types? Both output types are <OutputType>WinExe</OutputType> in the project file. Can I rebuild the components to work in a «Windows Forms Application» and if so, how?

Community's user avatar

asked Oct 29, 2013 at 20:44

GeezerGeek's user avatar

6

Look here

In the case of «Microsoft Windows», windows programs are software applications that are run on a computer that is also running Microsoft Windows as an operating system. A software application, or program, is a set of logical conditions grouped together to perform some function. Typically a Microsoft Windows application will be run within a «window» although that is not a requirement. A «window» in the context of software is an area of the screen set aside to run a single program and may or may not have options for controlling the position and size of the program area.
Some examples of Microsoft Windows applications are:

  • Microsoft Excel
  • Microsoft Internet Explorer
  • Notepad
  • Mozilla Firefox

and here another post

Windows *Forms* (WinForms) is the name given to the graphical application programming interface (API) included as a part of Microsoft .NET Framework, providing access to native Microsoft Windows interface elements by wrapping the extant Windows API in managed code. While it is seen as a replacement for the earlier and more complex C++ based Microsoft Foundation Class Library, it does not offer a paradigm comparable to Model–View–Controller. Some after-market and third party libraries have been created to provide this functionality. The most widely used of these is the User Interface Process Application Block, which is released by the Microsoft patterns & practices group as a free download that includes the source code for quick start examples.

also Windows Application include and WPF application (WPF — Windows Presentation Foundation) and Windows Form Application

WPF — look here

Hope this information wiil be helpfull for you

answered Nov 4, 2013 at 21:59

hbk's user avatar

hbkhbk

10.9k11 gold badges92 silver badges125 bronze badges

Console application

Console applications are light weight programs run inside the command prompt (DOS) window. They are commonly used for test applications.

Console-based applications include Alpine (an e-mail client), cmus (an audio player), Irssi (an IRC client), Lynx (a web browser), Midnight Commander (a file manager), Music on Console (an audio player), Mutt (an e-mail client), nano (a text editor), ne (a text editor), newsbeuter (an RSS reader), and ranger (a file manager).

Windows Application
Windows Applications are form based standard Windows desktop applications for common day to day tasks. Microsoft word is an example of a Windows application.

answered Sep 30, 2019 at 1:16

Mohammed Nazrudeen's user avatar

Console Applications don’t have user interfaces and are run in the Command Prompt. Windows Forms applications do have user interfaces.

That’s probably the biggest difference.

A Windows form application is an application that has a graphical user interface(GUI) like the Visual C# IDE. A console program on the other hand is a text application. There are not fancy controls like buttons or textboxes in a console application and they are run from the command prompt.

answered Oct 30, 2013 at 6:41

Monika's user avatar

MonikaMonika

2,18216 silver badges26 bronze badges

From the clue given by @HighCore I am going to assume that the «Windows Application» is a WPF
application, and that the «Windows Forms Application» is a WinForms application and the two are not compatible.
If someone could supply a more complete answer than this it would be great.

answered Nov 4, 2013 at 21:46

GeezerGeek's user avatar

GeezerGeekGeezerGeek

2412 gold badges3 silver badges9 bronze badges

  • Приложение windows 10 dolby access
  • Приложение photos windows 10 скачать
  • Приложение widi для windows 10 для телевизора lg скачать
  • Приложение photos windows 10 как поменять язык
  • Приложение whatsapp для компьютера windows 10