java 方法 pb中如何獲取messagebox的返回值?
pb中如何獲取messagebox的返回值?Integer Ret MessageBox Ret Message box=消息框(“prompt”,“who know the return value
pb中如何獲取messagebox的返回值?
Integer Ret MessageBox Ret Message box=消息框(“prompt”,“who know the return value of Message box”,異常!,確定取消!)單擊“確定”“取消返回”按鈕,消息框的值就不一樣了
我探索了很久,終于知道它只是一個(gè)不同于WinForm的參數(shù)。如果(MessageBox.顯示(內(nèi)容、標(biāo)題),MessageBoxButton.YesNo是否, MessageBoxImage.信息) == MessageBoxResult。是){標(biāo)簽1。Content=“是”}否則{標(biāo)簽1。Content=“no”}對(duì)話框結(jié)果是WinForm,消息框結(jié)果是WPF。這是一個(gè)簡(jiǎn)單的例子。雙擊表單以添加上一段,然后添加名為label1的label控件