I wanted to do a quick "hello world" example in VB.Net. The code is here:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim s As String
Dim r As Long
s = "hello"
r = MsgBox(s, MsgBoxStyle.OKCancel, "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
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.nai.com/phpclient/viewKDoc.aspx?url=kb/kb_kb38717.xml&docType=DOC_KnowledgeBase>
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Chris
"z" <z@z.z> wrote in message news:ulSt$Md8EH...@TK2MSFTNGP11.phx.gbl...
In .net, use messagebox.show("the message") instead.
Bernie Yaeger
"z" <z@z.z> wrote in message news:ulSt$Md8EH...@TK2MSFTNGP11.phx.gbl...
Dim s As String
s = "hello"
MessageBox.Show(s, "a message", MessageBoxButtons.OK)
Thanks very much, I will try the patch.
z
"Herfried K. Wagner [MVP]" <hirf-spa...@gmx.at> wrote in message
news:O$9JaVd8E...@TK2MSFTNGP10.phx.gbl...
I am glad to hear that!
> Thanks very much, I will try the patch.
I strongly recomment to install the patch.
Huh?! Why? 'MsgBox' is (still) available and valid part of Visual Basic
.NET (in other words, it's not deprecated).
I know it's not deprecated, but messagebox.show is more flexible, in my
opinion.
Bernie
"Herfried K. Wagner [MVP]" <hirf-spa...@gmx.at> wrote in message
news:OdAQy4d8...@TK2MSFTNGP11.phx.gbl...
z
"Herfried K. Wagner [MVP]" <hirf-spa...@gmx.at> wrote in message
news:%23wMRP4d...@TK2MSFTNGP09.phx.gbl...
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" <ber...@cherwellinc.com> wrote in message
news:%23IIPhif...@TK2MSFTNGP11.phx.gbl...