imgsimonebiliato Well-Known Member Licensed User Longtime User Oct 18, 2012 #1 Hi, is possibile to set a Msgbox, with buttons on it?
Ricky D Well-Known Member Licensed User Longtime User Oct 18, 2012 #2 Have a look at Msgbox2 It accepts up to 3 buttons. Positive, Cancel and Negative for example Code: Copy Dim i As Int i = Msgbox2("Make a choice here", "This is the title", "Edit", "Cancel", "Delete", null) Select i Case DialogResponse.POSITIVE Then 'Edit Case DialogResponse.CANCEL Then 'Cancel Case DialogResponse.NEGATIVE Then 'Delete End Select the null paramater is in place of a bitmap. I've never used this in my apps because I only write stuff for myself. let's say you only want 2 buttons : Code: Copy Dim i As Int i = Msgbox2("Make a choice here", "This is the title", "Yes", "", "No", null) see the 2ndbutton has "" as it's text? This means don't show it you then test it like this Code: Copy 'Select statement or If i=DialogResponse.POSITIVE Then 'do Yes code Else If i=DialogResponse.NEGATIVE Then 'do No code End If Hope this helps. regards, Ricky Upvote 0
Have a look at Msgbox2 It accepts up to 3 buttons. Positive, Cancel and Negative for example Code: Copy Dim i As Int i = Msgbox2("Make a choice here", "This is the title", "Edit", "Cancel", "Delete", null) Select i Case DialogResponse.POSITIVE Then 'Edit Case DialogResponse.CANCEL Then 'Cancel Case DialogResponse.NEGATIVE Then 'Delete End Select the null paramater is in place of a bitmap. I've never used this in my apps because I only write stuff for myself. let's say you only want 2 buttons : Code: Copy Dim i As Int i = Msgbox2("Make a choice here", "This is the title", "Yes", "", "No", null) see the 2ndbutton has "" as it's text? This means don't show it you then test it like this Code: Copy 'Select statement or If i=DialogResponse.POSITIVE Then 'do Yes code Else If i=DialogResponse.NEGATIVE Then 'do No code End If Hope this helps. regards, Ricky
imgsimonebiliato Well-Known Member Licensed User Longtime User Oct 18, 2012 #3 thank you ricky!!! :sign0060: Upvote 0