Community discussion forum
MsgBox Function
-
This thread is for discussions of MsgBox Function.
-
Advertisement
Simply the fastest line-level profiler for .NET ever
“The low overhead means it has minimal impact on the execution of my program”
Mark Everest, Development Team Leader, Renault F1 Team Ltd.Try out the new ANTS Profiler 4 for yourself. Download your 14-day trial now
-
Msgbox "Do you want to save changes?", vbYesNoCancel+vbExclamation+vbDefaultButton3 , "Front Page"
would set the default button as No.
vbDefaultButton3 is the button for No? Is button2 for cancel? Would we want the user to cancel if they accidently pressed enter so they would make the choice of yes or no?
I am new so bear with me! Thanks. -
Button2 would be for no and Button3 is for cancel...
-
I'm fairly new to VB but picking it up quite well.
Can I use custom buttons in a MsgBox? Like, if I want 'Fred', 'Bob' and 'Cancel'. -
Can we add button component in the Msgbox? if it's possible, how?
Example I want to add:
button vbYa (which is in Malay) and the button caption is "Ya" (equal to Yes in English)
button vbTidak (in Malay) and the caption is "Tidak" (equal to No in English)
it's about changing the msgbox caption into my own Language.
thanks -
I am not an expert infact im only 13 however i have been doing vb for about 2 years and i have sure done a lot with the msgbox() function and i do remember reading somewere that you cannot add or remove buttons from the default messages that vb has already installed for you, however if you build yourown msgbox the possibilities are endless you can even add images and movies and anything u can think of , the easiest and lamest way to do this is to make a new form and call it say........"Message1" make 2 Buttons (Command1 and Command2) and make the "Message1" default BorderStyle
03 - Fixed Dialog then it will look like a normal window then u can manually set the height and width to whatever u like and then just have tha application load the "Message1" form whenever u need the message box and actually those types of message boxes are the easiest to code for desisions like if u have "ya" and the user clicks it u just code the Command1 for "ya" and command2 for "Tidak"
THAT SHOULD WORK!!!!
if it doesnt send me an email at Fruit_Cake70@hotmail.com
good luck with your application -
if you have a message box like do you want to save changes you get yes , no and cancel but when you write a messagebox like that.
if msgbox("Do you want to save changes",vbyesnocancel)=vbyes then
' saving document
Else
' could be EITHER CANCEL OR NO
End if
can you see the problem? -
Dim ans As String
ans = MsgBox("Would you like to save changes?", vbYesNoCancel)
If ans = vbYes Then
'Put your Yes commands in here
Else
If ans = vbNo Then
'Put your No commands in here
Else
'Put your Cancel commands in here
End If
End If -
No, you need to make a new form that looks like a message box for that.

-
Hello
dear i dont know how i can add icons in menu bar in visual basic .
plaease help me to solve this problem.
khuram -
I get the following error:
Code: It is invalid to show a modal dialog or form when the application is not running in UserInteractive mode. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
-
hi,
is it possible to have something which will display the information (information is one or two lines of text) for few seconds and disappear. if i use msgbox for it, there are many message boxes in the application which becomes annoying to the user.
do i have to create a new form for it or there is another function.
thanx in advance,
bye
Post a reply
Quick links
Recent activity
- Mandy Bradley replied to Loop help needed
- Chris Hsu replied to How can I execute server-si...
- anu anand.lv replied to Excel Oledb Engine and VB.NET
- Rafeeque Ahmed replied to HELP ME, URGENT RESPONSE
- anu anand.lv replied to we search the company in I...
- chandradev prasad replied to how to select item to datag...
Enter your message below
Sign in or Join us (it's free).