1.按钮对话框
1 Imports NXOpen.uf 2 3 Module NXJournal 4 Sub Main (ByVal args() As String) 5 6 Dim UFS As UFSession = UFSession.GetUFSession() 7 Dim title_string As String = "对话框标题信息" 8 Dim psMessages() As String = {"对话框内容信息"} 9 Dim Mybutton As UFUi.MessageButtons 10 Mybutton.button1 = True ‘True显示按钮 false隐藏 11 Mybutton.button2 = True 12 Mybutton.label1 = "是" ‘按钮的名字 13 Mybutton.label2 = "否" 14 Mybutton.response1 = 1 ‘按钮的返回值 15 Mybutton.response2 = 2 16 Dim dialog_type As UiMessageDialogType = UiMessageDialogType.UiMessageWarning 17 Dim response As Integer 18 UFS.Ui.MessageDialog(title_string, dialog_type, psMessages, 1, 0, Mybutton, response) 19 20 If response = 2 Then 21 msgbox("2") 22 End If 23 End Sub 24 End Module
原文:https://www.cnblogs.com/qqqking/p/15356032.html