YesNo MessageBox not closing when x-button clicked

后端 未结 3 1673
北海茫月
北海茫月 2021-01-14 07:11

When I open a MessageBox with options YesNo, the (usually) cancelling cross in the upper right is shown but has no effect.

System.Windows.MessageBox.Show(\"R         


        
3条回答
  •  广开言路
    2021-01-14 07:34

    The Close button (in MsgBox's title bar): Since the MsgBox window is a built-in feature of the operating system, its X button is enabled only when certain buttons are present. If there is only an OK button, clicking the X button is the same as pressing OK. Otherwise, the X button is disabled unless there is a Cancel button, in which case clicking the X is the same as pressing Cancel.

    http://www.autohotkey.com/docs/commands/MsgBox.htm

    Its the default behavior! from the time it was MsgBox to the time its MessageBox!

提交回复
热议问题