MsgBox("test") no msg box?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • bokiteam@ms21.hinet.net

    #1

    MsgBox("test") no msg box?

    Hi All,

    I dont' know why I can not pop up a message box.

    MsgBox("test")

    it is ok in vb6...

    Best regards,
    Boki.

  • Aaron

    #2
    Re: MsgBox("te st") no msg box?

    Boki,

    try this

    Private Sub button1_Click(B yVal sender As System.Object, ByVal e As
    System.EventArg s) Handles button1.Click

    Messagebox.Show ("Hello, World")

    End Sub

    <bokiteam@ms21. hinet.net> wrote in message
    news:1137570490 .479621.196020@ g47g2000cwa.goo glegroups.com.. .[color=blue]
    > Hi All,
    >
    > I dont' know why I can not pop up a message box.
    >
    > MsgBox("test")
    >
    > it is ok in vb6...
    >
    > Best regards,
    > Boki.
    >[/color]


    Comment

    • bokiteam@ms21.hinet.net

      #3
      Re: MsgBox(&quot;te st&quot;) no msg box?

      Got it, thanks a lot. :)

      Best regards,
      Boki.

      Comment

      • Cor Ligthert [MVP]

        #4
        Re: MsgBox(&quot;te st&quot;) no msg box?

        Boki,

        MsgBox("test") works for me

        Although I never use it, I use messagebox.show

        I have no reason for that, it are more charachters so mostly I use the
        shorter one.

        I hope this helps,

        Cor


        Comment

        • Herfried K. Wagner [MVP]

          #5
          Re: MsgBox(&quot;te st&quot;) no msg box?

          <bokiteam@ms21. hinet.net> schrieb:[color=blue]
          > I dont' know why I can not pop up a message box.
          >
          > MsgBox("test")
          >
          > it is ok in vb6...[/color]

          It should work in VB.NET too. Where are you calling 'MsgBox'?

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

          Comment

          • Patrice

            #6
            Re: MsgBox(&quot;te st&quot;) no msg box?

            It should work. Always indicates what happens instead of just syaing it
            doesn't work.

            This is in the MicroftVisualBa sic namespcae. I velive you din"t have a
            reference to this making tuhis function unklnown...

            --

            <bokiteam@ms21. hinet.net> a écrit dans le message de
            news:1137570490 .479621.196020@ g47g2000cwa.goo glegroups.com.. .[color=blue]
            > Hi All,
            >
            > I dont' know why I can not pop up a message box.
            >
            > MsgBox("test")
            >
            > it is ok in vb6...
            >
            > Best regards,
            > Boki.
            >[/color]


            Comment

            • ZR

              #7
              Re: MsgBox(&quot;te st&quot;) no msg box?


              Msgbox is an old syntax - it works in VB.NET 2003 if you have
              Microsoft.Visua lBasic imported, but merely for compatibility reasons and may
              not be supported in future versions.
              Messagebox.Show is the correct VB.NET syntax that people should use.


              Comment

              • Herfried K. Wagner [MVP]

                #8
                Re: MsgBox(&quot;te st&quot;) no msg box?

                "ZR" <zdenko.rupcic@ zio.hr> schrieb:[color=blue]
                > Msgbox is an old syntax - it works in VB.NET 2003 if you have
                > Microsoft.Visua lBasic imported, but merely for compatibility reasons and
                > may not be supported in future versions.
                > Messagebox.Show is the correct VB.NET syntax that people should use.[/color]

                Sorry, but that's complete nonsense. "Microsoft.Visu alBasic.dll" is not the
                Visual Basic Compatibility Library
                ("Microsoft.Vis ualBasic.Compat ibility.dll"). It's part of Visual Basic .NET
                and there are no public plans to remove this library, as parts of it are
                strongly tied to the Visual Basic .NET programming language. Using
                "Microsoft.Visu alBasic.dll" is perfectly legitimate in VB.NET.

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

                Comment

                • ZR

                  #9
                  Re: MsgBox(&quot;te st&quot;) no msg box?

                  I was commenting the possible removal of Msgbox, NOT the removal of the
                  actual library where it is placed - now I see that wasn't very clear in my
                  previous post.

                  "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
                  news:OkK%23VNDH GHA.3100@tk2msf tngp13.phx.gbl. ..[color=blue]
                  > "ZR" <zdenko.rupcic@ zio.hr> schrieb:[color=green]
                  >> Msgbox is an old syntax - it works in VB.NET 2003 if you have
                  >> Microsoft.Visua lBasic imported, but merely for compatibility reasons and
                  >> may not be supported in future versions.
                  >> Messagebox.Show is the correct VB.NET syntax that people should use.[/color]
                  >
                  > Sorry, but that's complete nonsense. "Microsoft.Visu alBasic.dll" is not
                  > the Visual Basic Compatibility Library
                  > ("Microsoft.Vis ualBasic.Compat ibility.dll"). It's part of Visual Basic
                  > .NET and there are no public plans to remove this library, as parts of it
                  > are strongly tied to the Visual Basic .NET programming language. Using
                  > "Microsoft.Visu alBasic.dll" is perfectly legitimate in VB.NET.
                  >
                  > --
                  > M S Herfried K. Wagner
                  > M V P <URL:http://dotnet.mvps.org/>
                  > V B <URL:http://classicvb.org/petition/>[/color]


                  Comment

                  • Herfried K. Wagner [MVP]

                    #10
                    Re: MsgBox(&quot;te st&quot;) no msg box?

                    "ZR" <zdenko.rupcic@ zio.hr> schrieb:[color=blue]
                    >I was commenting the possible removal of Msgbox, NOT the removal of the
                    >actual library where it is placed - now I see that wasn't very clear in my
                    >previous post.[/color]

                    Well, I cannot think of any reason why 'MsgBox' should be removed. It's not
                    part of the compatibility library. 'MsgBox' exists even longer than
                    'MessageBox.Sho w', and I believe it will stay longer than 'MessageBox.Sho w'
                    because it's not tied to a certain technology. Technologies fade, languages
                    (should) persist.

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

                    Comment

                    • ZR

                      #11
                      Re: MsgBox(&quot;te st&quot;) no msg box?

                      I don't work for Microsoft so I can't guarantee that my theory is correct
                      :-)
                      But I don't see a point in introducing new syntax with .NET if they don't
                      plan to remove the old
                      snytax (which does the same thing) sooner or later - perhaps they won't
                      remove VB6 leftover
                      functions like MsgBox, only won't "recommend" using them (whatever that
                      would mean)

                      "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
                      news:%23HvbRYOH GHA.1288@TK2MSF TNGP09.phx.gbl. ..[color=blue]
                      > "ZR" <zdenko.rupcic@ zio.hr> schrieb:[color=green]
                      >>I was commenting the possible removal of Msgbox, NOT the removal of the
                      >>actual library where it is placed - now I see that wasn't very clear in my
                      >>previous post.[/color]
                      >
                      > Well, I cannot think of any reason why 'MsgBox' should be removed. It's
                      > not part of the compatibility library. 'MsgBox' exists even longer than
                      > 'MessageBox.Sho w', and I believe it will stay longer than
                      > 'MessageBox.Sho w' because it's not tied to a certain technology.
                      > Technologies fade, languages (should) persist.
                      >
                      > --
                      > M S Herfried K. Wagner
                      > M V P <URL:http://dotnet.mvps.org/>
                      > V B <URL:http://classicvb.org/petition/>[/color]


                      Comment

                      • Cor Ligthert [MVP]

                        #12
                        Re: MsgBox(&quot;te st&quot;) no msg box?

                        ZR
                        [color=blue]
                        >I don't work for Microsoft so I can't guarantee that my theory is correct
                        >:-)
                        > But I don't see a point in introducing new syntax with .NET if they don't
                        > plan to remove the old
                        > snytax (which does the same thing) sooner or later - perhaps they won't
                        > remove VB6 leftover[/color]

                        We have not seen any official information if either messagebox.show or
                        msgbox will be replaced.

                        There is as well not given any information, if both will stay or both in
                        future will completely be replaced by another class.

                        Even if it is as you write, than they probably will be directly converted to
                        what is needed in the version upgrade part.

                        Therefore all what you have read about this or think is just guessing in the
                        same way as that Saint Nicolas is retiring in future and will be replaced by
                        Saint John.

                        However we have seen a lot of this guessing here.

                        I hope this gives an idea.

                        Cor


                        Comment

                        • Herfried K. Wagner [MVP]

                          #13
                          Re: MsgBox(&quot;te st&quot;) no msg box?

                          "ZR" <zdenko.rupcic@ zio.hr> schrieb:[color=blue]
                          >I don't work for Microsoft so I can't guarantee that my theory is correct
                          >:-)
                          > But I don't see a point in introducing new syntax with .NET if they don't
                          > plan to remove the old
                          > snytax (which does the same thing) sooner or later - perhaps they won't
                          > remove VB6 leftover
                          > functions like MsgBox, only won't "recommend" using them (whatever that
                          > would mean)[/color]

                          I don't think these functions are leftover functions. Would you consider
                          C#'s and VB.NET's syntax as "leftover" syntax of C, Java, and VB6? Why not
                          just use IL assembler for development? It's the only .NET programming
                          language that doesn't suffer from the "leftover" thingy. The intention and
                          benefit of .NET is not that code looks the same in all .NET programming
                          languages. If this was the goal, there would only be IL assembler or a more
                          high-level programming language available. The main point of .NET is
                          interoperabilit y of components developed using different .NET-enabled
                          programming languages. It doesn't matter whether or not you are using
                          'MsgBox' or 'MessageBox' instead. It matters that you are using managed
                          code with all of its benefits.

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

                          Comment

                          Working...