What is the Neutral Language setting used for?

I believe it sets the NeutralResourcesLanguageAttribute for the assembly. From the docs: The NeutralResourcesLanguageAttribute informs the ResourceManager of the language used to write the neutral culture’s resources for an assembly, and can also inform the ResourceManager of the assembly to use (either the main assembly or a satellite assembly) to retrieve neutral resources using the … Read more

How to store passwords in Winforms application?

The sanctified method is to use CryptoAPI and the Data Protection APIs. To encrypt, use something like this (C++): DATA_BLOB blobIn, blobOut; blobIn.pbData=(BYTE*)data; blobIn.cbData=wcslen(data)*sizeof(WCHAR); CryptProtectData(&blobIn, description, NULL, NULL, NULL, CRYPTPROTECT_LOCAL_MACHINE | CRYPTPROTECT_UI_FORBIDDEN, &blobOut); _encrypted=blobOut.pbData; _length=blobOut.cbData; Decryption is the opposite: DATA_BLOB blobIn, blobOut; blobIn.pbData=const_cast<BYTE*>(data); blobIn.cbData=length; CryptUnprotectData(&blobIn, NULL, NULL, NULL, NULL, CRYPTPROTECT_UI_FORBIDDEN, &blobOut); std::wstring _decrypted; _decrypted.assign((LPCWSTR)blobOut.pbData,(LPCWSTR)blobOut.pbData+blobOut.cbData/sizeof(WCHAR)); If … Read more

Winforms – how to show/hide elements in designer?

Several options here: Use the Document Outline view (View –> Other Windows –> Document Outline) to select the panel you care about. You can right-click on it and choose Bring to Front to put it in front of everything else. Though it’s probably not relevant to what you’re doing, you might consider using a TabControl, … Read more

How do I turn off Compatibility View on the IE WebBrowserControl in a WinForms app?

There is no way to do this other than configuring the following registry settings: HKLM\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION or if it’s a 32 bit app on 64 bit Windows: HKLM\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION` These settings aren’t surfaced in the WebBrowser control. For more information please see: What IE compatibility mode does the webbrowser control use? In case the link … Read more

MVVM for winforms [duplicate]

I think that there are two answers here… really just one answer to “Should I” and one answer to “Could I”. As far as “Could I”, it is certainly possible. MVVM really just relies on a view that can bind to a view model. Since WinForms supports binding, this certainly is possible. You may need … Read more