Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

MessageBoxButtons with other words 2

Status
Not open for further replies.

RSilva

Mechanical
Jun 23, 2017
35
Hello
I want create 1 Box that show 3 buttons with "1", "2" and "a"
I found this comand MessageBoxButtons like this exemple:

Code:
result = MessageBox.Show("Choose 1 option", "", MessageBoxButtons.YesNoCancel)

there are any way to change "yes", "no" and "cancel" for "1", "2" and "a"?

Rúben Silva
 
Replies continue below

Recommended for you

No, the message box function has a few, very specific options. If you would like something outside of these options, you will need to make a custom messagebox (using a winform or the NX blockstyler).

www.nxjournaling.com
 
Function AskMsg(ByVal title As String, ByVal message As String) As Boolean
Dim messages As String() = {message}
Dim buttons As UFUi.MessageButtons
With buttons
.button1 = True
.button2 = False
.button3 = True
.label1 = "Yes"
.label2 = Nothing
.label3 = "No"
.response1 = 1
.response2 = 0
.response3 = 2
End With
Dim resp As Integer

theUFSession.Ui.LockUgAccess(UFConstants.UF_UI_FROM_CUSTOM)
theUFSession.Ui.MessageDialog(title, UiMessageDialogType.UiMessageQuestion, messages, 1, True, buttons, resp)
theUFSession.Ui.UnlockUgAccess(UFConstants.UF_UI_FROM_CUSTOM)

If resp = 1 Then Return True Else Return False
End Function
 
By the way Daluigi, you saved my day
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor