Adding help icon to WinForms form titlebar

2019-05-14 03:00发布

问题:

Some Windows native applications have a question mark icon on the title bar. It's usually at the right edge, just near the close button. How can I do this in a C# WinForms application? I'd like a solution that works in Windows XP onward.

回答1:

Set the form's HelpButton property to True. You also need to have the MaximizeButton and MinimizeButton properties set to False.