473,322 Members | 1,504 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

msgbox doesn't display prompt text

z
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(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
Nov 21 '05 #1
10 4540
"z" <z@z.z> schrieb:
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)


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/>
Nov 21 '05 #2
Try using MessageBox.Show(.....) method.

Chris
"z" <z@z.z> wrote in message news:ul**************@TK2MSFTNGP11.phx.gbl...
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(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

Nov 21 '05 #3
Hi Z,

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

Bernie Yaeger

"z" <z@z.z> wrote in message news:ul**************@TK2MSFTNGP11.phx.gbl...
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(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

Nov 21 '05 #4

"z" <z@z.z> wrote in message news:ul**************@TK2MSFTNGP11.phx.gbl...
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(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

....

Dim s As String
s = "hello"
MessageBox.Show(s, "a message", MessageBoxButtons.OK)
Nov 21 '05 #5
z
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]" <hi***************@gmx.at> wrote in message
news:O$**************@TK2MSFTNGP10.phx.gbl...
"z" <z@z.z> schrieb:
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)
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/phpclie...=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/>

Nov 21 '05 #6
"z" <z@z.z> schrieb:
Outstanding. That is the problem! I disabled buffer overrun in my McAfee
version 8 software and it started working.
I am glad to hear that!
Thanks very much, I will try the patch.


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/>
Nov 21 '05 #7
"Bernie Yaeger" <be*****@cherwellinc.com> schrieb:
In .net, use messagebox.show("the message") instead.


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/>
Nov 21 '05 #8
Hi Herfried,

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

Bernie

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:Od**************@TK2MSFTNGP11.phx.gbl...
"Bernie Yaeger" <be*****@cherwellinc.com> schrieb:
In .net, use messagebox.show("the message") instead.


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/>

Nov 21 '05 #9
z
The patch worked perfectly.

z

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
"z" <z@z.z> schrieb:
Outstanding. That is the problem! I disabled buffer overrun in my McAfee version 8 software and it started working.


I am glad to hear that!
Thanks very much, I will try the patch.


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/>

Nov 21 '05 #10
z
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" <be*****@cherwellinc.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi Herfried,

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

Bernie

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:Od**************@TK2MSFTNGP11.phx.gbl...
"Bernie Yaeger" <be*****@cherwellinc.com> schrieb:
In .net, use messagebox.show("the message") instead.


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/>


Nov 21 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

39
by: Mark Johnson | last post by:
It doesn't seem possible. But would the following also seem a violation of the general notions behind css? You have a DIV, say asociated with class, 'topdiv'. Inside of that you have an anchor...
1
by: Daryl Zavier | last post by:
Hi Guys, I'm really new to .Net development and need your advise on this. Recently I've completed a web application using VB.net (Visual Studio .Net 2003). In the application whenever the user...
14
by: Susan Bricker | last post by:
Hi. I have Access 2003 and I am finding that the font in the text displayed in Msgbox displays it too small. Is there anyway to increase the font size of that text? Regards, SueB *** Sent...
17
by: MLH | last post by:
Can I control what text appears on msgbox function buttons? Sure do like NOT having to build a form to show a msg and solicit a YES/NO response. MsgBox function is a great solution for that. ...
4
by: | last post by:
I have about 20 MsgBox occurance in by program, which I use to inform the user of the progress of the program, or ask confirmation of an action, or simply to act separators to various parts of the...
1
by: bigmaddaz | last post by:
Ok im designing an application for working out compount interest. The user starts the page, 3 prompts appear, one asking for money invested, next asking for rate of interest, and last one asking for...
4
by: rzito | last post by:
I am looking for a technique with regards to the message displayed when you enter text into a numeric field. I obviously get the "The value entered isn't valid for this field" message how do I...
2
by: perkykoala | last post by:
I apologize in advance for being REALLY detailed/verbose. It's the result of staring/tweaking code for too long. Using VB 2005: I need to design a multiple choice test (unfortunately, I can't...
5
by: win | last post by:
I'm using ASP.Net 2.0 MsgBox("Are you sure to delete?", MsgBoxStyle.Question + MsgBoxStyle.OkCancel, Page.Title.ToString) The message box sometimes does not pop up on the top of the screen....
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.