Windows Forms YesNo Message Box - Buttons Text [duplicate] - winforms

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to change button text for Yes & No buttons on MessageBox.Show Dialog?
In a Windows Forms application I have a MessageBox with YesNo buttons. I want to change the text on the buttons (from "Yes", "No" to something custom).

If I were you I'd create my own MessageBox dialog. It's not that hard and I'm sure you'd be able to do this faster than hacking the standard MessageBox.

Your only possible "customization" with the winforms MessageBox is to use the MessageBoxButton enumeration when creating the MessageBox.
It is fairly limited, so looking for a third party message box or creating your own dialog box may be a better choice.

Related

Moving to next control on button click in WPF [duplicate]

This question already has answers here:
Moving to next control on Enter keypress in WPF
(7 answers)
Closed 8 years ago.
I want to move to the next control when I click the button instead of the Tab key in a WPF MVVM application. How can I achieve this?
You question seems not clear. But to set focus on a control you can do this
controlId.focus()
However, check out Moving to next control on Enter keypress in WPF, it could be of help too

Why are group boxes, being static, a type of Button control?

Just out of curiosity,
The Win32 Group Box control is actually a Button control with the style BS_GROUPBOX applied. As the control is static, being simply text with a special border, why is it one of the Button styles, when the rest are all for actual buttons or button-like UI elements which receive user input?
Thanks in advance for any insights.
This goes way back to the 1980s. Everybody that worked on it is drinking pina coladas in Hawai today so we'll have to make-do with a guess. The likely one is that, since it was so very important to minimize the foot-print of Windows back then, that the existing plumbing for the BUTTON control was re-usable to implement a group box as well.

Delete Close button in WPF window [duplicate]

This question already has answers here:
How to hide close button in WPF window?
(23 answers)
Closed 9 years ago.
I am trying to delete "X"/ Close button on the right side of the WPF window. I tried researching a lot about it on internet and came across 2 methods of doing it.
Completely removing the title bar by using GetWindowLong and SetWindowLong using solution posted in this post.
How to hide close button in WPF window?
Problem - this method removes the complete System menu(buttons of right side + Icon on left side) and I don't want ICON to disappear.
Used GetSystemMenu,RemoveMenu
Problem - this method only disables/grays out the X button although it keeps the ICON but doesn't remove the X button.
Can someone please help me with this issue?
You need to create your own chrome, add the buttons for minimize, maximize, close, etc, and disable the close button. You need to provide code for all the other functions, such as dragging area, context menus for moving, etc. Not too much and it will get you exactly what you want.

WPF autocomplete Combobox [duplicate]

This question already has an answer here:
Closed 10 years ago.
Possible Duplicate:
IsEditable property of WPF combobox
I have heard that autocomplete does not work (out of box) in WPF combobox but when I type characters in teh WPF combo, it matches existing items of combo and automatically completes it. Isn't this autocomplete?
Am I missing a point?
The WPF combobox does match existing values as you type, but...
Generally when people refer to an autocomplete combobox they mean a combobox that makes a backend query of some sort that will populate the dropdown with new values that match the criteria as the user types.

Add customized buttons to the existing MessageBox

How can I add custom buttons to the existing MessageBox in WPF? Apart from the usual Ok and Cancel buttons, I need to add 3 more buttons and also handle their events.
Short answer: No it is not possible, you need to write a new window.
Long answer: the MessageBox class uses the Win32 MessageBox (or maybe MessageBoxEx) function, this function does not support extending the message box.
It is possible to modify the message box after it is opened, but:
It is a lot of work
It isn't supported
you have to do it using Win32 directly, the message box window is not WPF or even WinForms.
All in all, it's less work to write a window with one TextBlock, one Image and 5 buttons than to mess around with internal implementation details of the MessageBox code.

Resources