Members

Technology Zones

IBM Learning Center

Articles

Hosted By

MaximumASP

Info

[7] MsgBox Function

Last post 05-17-2005 7:23 AM by forvihang. 11 replies.
Page 1 of 1 (12 items)
Sort Posts: Previous Next
  • 01-01-1999 12:00 AM

    [7] MsgBox Function

    This thread is for discussions of MsgBox Function.

    • Post Points: 0
  • Advertisement

    • Red Gate Software

    Advertisement

    Want to boost your .NET application performance?

    Some developers always seem to write efficient and lightening-fast code. What is their secret? It’s ANTS Profiler. “We improved the performance of the application up to 10 times” Dan Ports, Intrigma.

    Try it for yourself now.

  • 01-27-2002 10:25 PM In reply to

    Question on vbyesnocancel

    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.
    • Post Points: 0
  • 01-30-2002 9:14 PM In reply to

    Just a little something

    Button2 would be for no and Button3 is for cancel...
    • Post Points: 0
  • 03-25-2002 12:08 PM In reply to

    • Fatman
    • Not Ranked
    • Joined on 03-25-2002
    • New Member
    • Points 10

    Question: Custom Buttons?

    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'.
    • Post Points: 0
  • 05-20-2002 12:00 AM In reply to

    • ayie
    • Not Ranked
    • Joined on 05-19-2002
    • New Member
    • Points 10

    Msgbox button component

    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
    • Post Points: 0
  • 09-24-2002 7:49 PM In reply to

    • Jcon
    • Not Ranked
    • Joined on 09-24-2002
    • New Member
    • Points 5

    Give this a try

    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
    • Post Points: 0
  • 10-05-2002 11:12 AM In reply to

    Three buttons

      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?
    • Post Points: 0
  • 10-08-2002 10:22 PM In reply to

    This is how you write it :D

    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
    • Post Points: 0
  • 04-21-2003 6:11 PM In reply to

    No, you need to make a new form that looks like a message box for that.
    • Post Points: 0
  • 04-12-2004 2:25 AM In reply to

    • khurem
    • Not Ranked
    • Joined on 04-09-2004
    • New Member
    • Points 5

    Add icon in menu bar

    Hello
    dear i dont know how i can add icons in menu bar in visual basic .
    plaease help me to solve this problem.
    khuram
    • Post Points: 0
  • 03-18-2005 4:20 PM In reply to

    • JLG2000
    • Not Ranked
    • Joined on 03-18-2005
    • New Member
    • Points 5

    This code doesn't work.

    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.
    • Post Points: 0
  • 05-17-2005 7:23 AM In reply to

    alternative to Msgbox function

    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 Points: 0
Page 1 of 1 (12 items)