Can You Customize Message Box Buttons in Visual Basic 6?

  • Thread starter Thread starter dt19
  • Start date Start date
  • Tags Tags
    Visual
Click For Summary

Discussion Overview

The discussion centers around the customization of message box buttons in Visual Basic 6, particularly whether it is possible to change the text of the buttons beyond the default options like 'OK'. Participants explore the limitations and alternatives for creating custom message boxes.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant inquires about changing the text of message box buttons in VB6, specifically asking if a button can say something other than 'OK'.
  • Another participant suggests that while there are limited options for button text, a custom message box can be created to display any desired text.
  • A later reply reiterates the possibility of creating a custom message box, emphasizing that it may be easier than trying to modify the default message box.
  • One participant acknowledges the complexity involved in changing button text, noting that it requires in-depth knowledge of the Windows operating system and that changes can only be made after the window is instantiated.

Areas of Agreement / Disagreement

Participants generally agree that creating a custom message box is a viable solution, but there is disagreement regarding the feasibility and complexity of modifying the default message box buttons.

Contextual Notes

Some limitations include the unclear extent of customization possible with the built-in message box and the specific requirements for creating a custom message box.

dt19
Messages
46
Reaction score
0
i'm learning a bit of VB at the moment and i wondered if it is possible to change the text of the message box buttons? like if you have a warning boxtriggered by some event, can you make it say something different to 'OK' ?
 
Technology news on Phys.org
Yes, but the choices are limited.
Type a comma after the prompt message.
It should pop up box with the options.
Multiple options are selected by typing + after the first option.

You can also write your own message box.
 
NoTime said:
Yes, but the choices are limited.
Type a comma after the prompt message.
It should pop up box with the options.
Multiple options are selected by typing + after the first option.

You can also write your own message box.


yes, i know you can have things other than ok (maybe i didn't make myself clear) but can you actually write your own text for the buttons? like if you had an 'exit' command button, could you have a message box pop up where you press a button that says 'goodbye' on it to leave the programme?
 
Just make your own, it will probably take you less time. Design a form. Put the required graphics on there, and call it when necessary. Pass whatever string to it, etc...
 
dt19 said:
yes, i know you can have things other than ok (maybe i didn't make myself clear) but can you actually write your own text for the buttons? like if you had an 'exit' command button, could you have a message box pop up where you press a button that says 'goodbye' on it to leave the programme?
Yes, it is possible.
It is very complex to do so and requires an indepth knowledge of windows o/s.
Even then, you can't actually change the text until the window is instantiated.

Much easier to write your own message box screen.
You can make it look and act just like the built in msgbox and you can make it say anything you want.
 

Similar threads

Replies
4
Views
4K
  • · Replies 16 ·
Replies
16
Views
5K
Replies
15
Views
11K
Replies
2
Views
3K
  • · Replies 7 ·
Replies
7
Views
12K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 12 ·
Replies
12
Views
2K
Replies
2
Views
3K
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K