msgbox doesn't display prompt text

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • z

    msgbox doesn't display prompt text

    I just installed Visual Studio .Net with Framework 1.1. I already had VB6
    SP6 installed.

    I wanted to do a quick "hello world" example in VB.Net. The code is here:

    Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
    System.EventArg s) Handles Button1.Click
    Dim s As String
    Dim r As Long

    s = "hello"
    r = MsgBox(s, MsgBoxStyle.OKC ancel, "a message")
    End Sub

    The msgbox pops up when you click the button, but the box is empty, and the
    buttons have no text on them (saying OK or Cancel), they are just empty grey
    buttons. The title does display correctly as "a message". I then ran the
    Calc application sample that comes with the .Net install which has a msgbox
    when you try to divide by zero, and it's message box and buttons are empty
    too.

    This appears to be a bug, but am I missing something? There are no service
    packs for the 1.1 framework yet.

    Any help or knowledge would be appreciated.

    z


  • Herfried K. Wagner [MVP]

    #2
    Re: msgbox doesn't display prompt text

    "z" <z@z.z> schrieb:[color=blue]
    > I wanted to do a quick "hello world" example in VB.Net. The code is here:
    >
    > Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
    > System.EventArg s) Handles Button1.Click
    > Dim s As String
    > Dim r As Long
    >
    > s = "hello"
    > r = MsgBox(s, MsgBoxStyle.OKC ancel, "a message")
    > End Sub
    >
    > The msgbox pops up when you click the button, but the box is empty, and
    > the
    > buttons have no text on them (saying OK or Cancel)[/color]

    Maybe you are using McAfee VirusScan. This product has a bug in its buffer
    overflow protection that NAI is aware of and that can be fixed by installing
    a patch:

    Patch 5 for McAfee VirusScan Enterprise 8.0i
    <URL:https://knowledgemap.na i.com/phpclient/viewKDoc.aspx?u rl=kb/kb_kb38717.xml& docType=DOC_Kno wledgeBase>

    --
    M S Herfried K. Wagner
    M V P <URL:http://dotnet.mvps.org/>
    V B <URL:http://dotnet.mvps.org/dotnet/faqs/>


    Comment

    • Chris, Master of All Things Insignificant

      #3
      Re: msgbox doesn't display prompt text

      Try using MessageBox.Show (.....) method.

      Chris


      "z" <z@z.z> wrote in message news:ulSt$Md8EH A.2196@TK2MSFTN GP11.phx.gbl...[color=blue]
      >I just installed Visual Studio .Net with Framework 1.1. I already had VB6
      > SP6 installed.
      >
      > I wanted to do a quick "hello world" example in VB.Net. The code is here:
      >
      > Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
      > System.EventArg s) Handles Button1.Click
      > Dim s As String
      > Dim r As Long
      >
      > s = "hello"
      > r = MsgBox(s, MsgBoxStyle.OKC ancel, "a message")
      > End Sub
      >
      > The msgbox pops up when you click the button, but the box is empty, and
      > the
      > buttons have no text on them (saying OK or Cancel), they are just empty
      > grey
      > buttons. The title does display correctly as "a message". I then ran the
      > Calc application sample that comes with the .Net install which has a
      > msgbox
      > when you try to divide by zero, and it's message box and buttons are empty
      > too.
      >
      > This appears to be a bug, but am I missing something? There are no
      > service
      > packs for the 1.1 framework yet.
      >
      > Any help or knowledge would be appreciated.
      >
      > z
      >
      >[/color]


      Comment

      • Bernie Yaeger

        #4
        Re: msgbox doesn't display prompt text

        Hi Z,

        In .net, use messagebox.show ("the message") instead.

        Bernie Yaeger

        "z" <z@z.z> wrote in message news:ulSt$Md8EH A.2196@TK2MSFTN GP11.phx.gbl...[color=blue]
        >I just installed Visual Studio .Net with Framework 1.1. I already had VB6
        > SP6 installed.
        >
        > I wanted to do a quick "hello world" example in VB.Net. The code is here:
        >
        > Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
        > System.EventArg s) Handles Button1.Click
        > Dim s As String
        > Dim r As Long
        >
        > s = "hello"
        > r = MsgBox(s, MsgBoxStyle.OKC ancel, "a message")
        > End Sub
        >
        > The msgbox pops up when you click the button, but the box is empty, and
        > the
        > buttons have no text on them (saying OK or Cancel), they are just empty
        > grey
        > buttons. The title does display correctly as "a message". I then ran the
        > Calc application sample that comes with the .Net install which has a
        > msgbox
        > when you try to divide by zero, and it's message box and buttons are empty
        > too.
        >
        > This appears to be a bug, but am I missing something? There are no
        > service
        > packs for the 1.1 framework yet.
        >
        > Any help or knowledge would be appreciated.
        >
        > z
        >
        >[/color]


        Comment

        • dotNETnews

          #5
          Re: msgbox doesn't display prompt text


          "z" <z@z.z> wrote in message news:ulSt$Md8EH A.2196@TK2MSFTN GP11.phx.gbl...[color=blue]
          >I just installed Visual Studio .Net with Framework 1.1. I already had VB6
          > SP6 installed.
          >
          > I wanted to do a quick "hello world" example in VB.Net. The code is here:
          >
          > Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
          > System.EventArg s) Handles Button1.Click
          > Dim s As String
          > Dim r As Long
          >
          > s = "hello"
          > r = MsgBox(s, MsgBoxStyle.OKC ancel, "a message")
          > End Sub[/color]
          ....

          Dim s As String
          s = "hello"
          MessageBox.Show (s, "a message", MessageBoxButto ns.OK)


          Comment

          • z

            #6
            Re: msgbox doesn't display prompt text

            Outstanding. That is the problem! I disabled buffer overrun in my McAfee
            version 8 software and it started working.

            Thanks very much, I will try the patch.

            z


            "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
            news:O$9JaVd8EH A.1408@TK2MSFTN GP10.phx.gbl...[color=blue]
            > "z" <z@z.z> schrieb:[color=green]
            > > I wanted to do a quick "hello world" example in VB.Net. The code is[/color][/color]
            here:[color=blue][color=green]
            > >
            > > Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
            > > System.EventArg s) Handles Button1.Click
            > > Dim s As String
            > > Dim r As Long
            > >
            > > s = "hello"
            > > r = MsgBox(s, MsgBoxStyle.OKC ancel, "a message")
            > > End Sub
            > >
            > > The msgbox pops up when you click the button, but the box is empty, and
            > > the
            > > buttons have no text on them (saying OK or Cancel)[/color]
            >
            > Maybe you are using McAfee VirusScan. This product has a bug in its[/color]
            buffer[color=blue]
            > overflow protection that NAI is aware of and that can be fixed by[/color]
            installing[color=blue]
            > a patch:
            >
            > Patch 5 for McAfee VirusScan Enterprise 8.0i
            >[/color]
            <URL:https://knowledgemap.nai.com/phpclie...=kb/kb_kb38717.
            xml&docType=DOC _KnowledgeBase>[color=blue]
            >
            > --
            > M S Herfried K. Wagner
            > M V P <URL:http://dotnet.mvps.org/>
            > V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
            >
            >[/color]


            Comment

            • Herfried K. Wagner [MVP]

              #7
              Re: msgbox doesn't display prompt text

              "z" <z@z.z> schrieb:[color=blue]
              > Outstanding. That is the problem! I disabled buffer overrun in my McAfee
              > version 8 software and it started working.[/color]

              I am glad to hear that!
              [color=blue]
              > Thanks very much, I will try the patch.[/color]

              I strongly recomment to install the patch.

              --
              M S Herfried K. Wagner
              M V P <URL:http://dotnet.mvps.org/>
              V B <URL:http://dotnet.mvps.org/dotnet/faqs/>


              Comment

              • Herfried K. Wagner [MVP]

                #8
                Re: msgbox doesn't display prompt text

                "Bernie Yaeger" <berniey@cherwe llinc.com> schrieb:[color=blue]
                > In .net, use messagebox.show ("the message") instead.[/color]

                Huh?! Why? 'MsgBox' is (still) available and valid part of Visual Basic
                ..NET (in other words, it's not deprecated).

                --
                M S Herfried K. Wagner
                M V P <URL:http://dotnet.mvps.org/>
                V B <URL:http://dotnet.mvps.org/dotnet/faqs/>


                Comment

                • Bernie Yaeger

                  #9
                  Re: msgbox doesn't display prompt text

                  Hi Herfried,

                  I know it's not deprecated, but messagebox.show is more flexible, in my
                  opinion.

                  Bernie

                  "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
                  news:OdAQy4d8EH A.2196@TK2MSFTN GP11.phx.gbl...[color=blue]
                  > "Bernie Yaeger" <berniey@cherwe llinc.com> schrieb:[color=green]
                  >> In .net, use messagebox.show ("the message") instead.[/color]
                  >
                  > Huh?! Why? 'MsgBox' is (still) available and valid part of Visual Basic
                  > .NET (in other words, it's not deprecated).
                  >
                  > --
                  > M S Herfried K. Wagner
                  > M V P <URL:http://dotnet.mvps.org/>
                  > V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
                  >[/color]


                  Comment

                  • z

                    #10
                    Re: msgbox doesn't display prompt text

                    The patch worked perfectly.

                    z

                    "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
                    news:%23wMRP4d8 EHA.2900@TK2MSF TNGP09.phx.gbl. ..[color=blue]
                    > "z" <z@z.z> schrieb:[color=green]
                    > > Outstanding. That is the problem! I disabled buffer overrun in my[/color][/color]
                    McAfee[color=blue][color=green]
                    > > version 8 software and it started working.[/color]
                    >
                    > I am glad to hear that!
                    >[color=green]
                    > > Thanks very much, I will try the patch.[/color]
                    >
                    > I strongly recomment to install the patch.
                    >
                    > --
                    > M S Herfried K. Wagner
                    > M V P <URL:http://dotnet.mvps.org/>
                    > V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
                    >
                    >[/color]


                    Comment

                    • z

                      #11
                      Re: msgbox doesn't display prompt text

                      Bernie,

                      I wasn't looking for flexibility, I was looking for it to work. See
                      Herfried's valid solution in the other replies.

                      z


                      "Bernie Yaeger" <berniey@cherwe llinc.com> wrote in message
                      news:%23IIPhif8 EHA.1400@TK2MSF TNGP11.phx.gbl. ..[color=blue]
                      > Hi Herfried,
                      >
                      > I know it's not deprecated, but messagebox.show is more flexible, in my
                      > opinion.
                      >
                      > Bernie
                      >
                      > "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
                      > news:OdAQy4d8EH A.2196@TK2MSFTN GP11.phx.gbl...[color=green]
                      > > "Bernie Yaeger" <berniey@cherwe llinc.com> schrieb:[color=darkred]
                      > >> In .net, use messagebox.show ("the message") instead.[/color]
                      > >
                      > > Huh?! Why? 'MsgBox' is (still) available and valid part of Visual[/color][/color]
                      Basic[color=blue][color=green]
                      > > .NET (in other words, it's not deprecated).
                      > >
                      > > --
                      > > M S Herfried K. Wagner
                      > > M V P <URL:http://dotnet.mvps.org/>
                      > > V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
                      > >[/color]
                      >
                      >[/color]


                      Comment

                      Working...