Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

`MessageBox`, `SaveFileDialog` in .NET: which version should I use?

Which one should I use and what are the differences:

System.Windows.MessageBox

System.Windows.Forms.MessageBox

The same question about System.Windows.Forms.SaveFileDialog and Microsoft.Win32.SaveFileDialog.

All I need is to show a message box and save file dialog (working on Windows XP as well).

Proper re-tagging is appreciated.

Thanks in advance, kh.

like image 207
khachik Avatar asked Dec 28 '22 04:12

khachik


1 Answers

The controls in the System.Windows.Forms namespace are for WinForms applications. The controls in the System.Windows namespace are for WPF/Silverlight applications. So pick the controls that match your application type.

like image 55
Damien_The_Unbeliever Avatar answered Jan 13 '23 22:01

Damien_The_Unbeliever