473,406 Members | 2,293 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,406 software developers and data experts.

Simplest program ever - and does not work!

Hello all,

Just downloaded the .NET SDK and, to test it works, I
write this "Hello world" code:

Option explicit

Imports System

' A "Hello World!" program in Visual Basic.

Module Hello
Sub Main()
Microsoft.VisualBasic.Interaction.MsgBox("Hello, world!")
End Sub
End Module

It compiles fine and works. Now I replace the MsgBox
sentence with just

MsgBox("La vamos a liar")

and the compiler does not like it. It tells me 'Name
MsgBox is not declared'. So is not the import statement
working?

Given this symptom, what could be the problem?

Regards

Nov 20 '05 #1
11 1736
On 2003-11-23, Angel Salamanca <an***************@telefonica.net> wrote:
Hello all,

Just downloaded the .NET SDK and, to test it works, I
write this "Hello world" code:

Option explicit

Imports System

' A "Hello World!" program in Visual Basic.

Module Hello
Sub Main()
Microsoft.VisualBasic.Interaction.MsgBox("Hello, world!")
End Sub
End Module

It compiles fine and works. Now I replace the MsgBox
sentence with just

MsgBox("La vamos a liar")

and the compiler does not like it. It tells me 'Name
MsgBox is not declared'. So is not the import statement
working?

Given this symptom, what could be the problem?

Regards


Add:

Imports Microsoft.VisualBasic

--
Tom Shelton
MVP [Visual Basic]
Nov 20 '05 #2
On 2003-11-23, Angel Salamanca <an***************@telefonica.net> wrote:
Hello all,

Just downloaded the .NET SDK and, to test it works, I
write this "Hello world" code:

Option explicit

Imports System

' A "Hello World!" program in Visual Basic.

Module Hello
Sub Main()
Microsoft.VisualBasic.Interaction.MsgBox("Hello, world!")
End Sub
End Module

It compiles fine and works. Now I replace the MsgBox
sentence with just

MsgBox("La vamos a liar")

and the compiler does not like it. It tells me 'Name
MsgBox is not declared'. So is not the import statement
working?

Given this symptom, what could be the problem?

Regards


Add:

Imports Microsoft.VisualBasic

--
Tom Shelton
MVP [Visual Basic]
Nov 20 '05 #3
Type
Imports Microsoft.visualbasic.interaction

at the top of ur program.
"Angel Salamanca" <an***************@telefonica.net> wrote in message
news:05****************************@phx.gbl...
Hello all,

Just downloaded the .NET SDK and, to test it works, I
write this "Hello world" code:

Option explicit

Imports System

' A "Hello World!" program in Visual Basic.

Module Hello
Sub Main()
Microsoft.VisualBasic.Interaction.MsgBox("Hello, world!")
End Sub
End Module

It compiles fine and works. Now I replace the MsgBox
sentence with just

MsgBox("La vamos a liar")

and the compiler does not like it. It tells me 'Name
MsgBox is not declared'. So is not the import statement
working?

Given this symptom, what could be the problem?

Regards

Nov 20 '05 #4
Type
Imports Microsoft.visualbasic.interaction

at the top of ur program.
"Angel Salamanca" <an***************@telefonica.net> wrote in message
news:05****************************@phx.gbl...
Hello all,

Just downloaded the .NET SDK and, to test it works, I
write this "Hello world" code:

Option explicit

Imports System

' A "Hello World!" program in Visual Basic.

Module Hello
Sub Main()
Microsoft.VisualBasic.Interaction.MsgBox("Hello, world!")
End Sub
End Module

It compiles fine and works. Now I replace the MsgBox
sentence with just

MsgBox("La vamos a liar")

and the compiler does not like it. It tells me 'Name
MsgBox is not declared'. So is not the import statement
working?

Given this symptom, what could be the problem?

Regards

Nov 20 '05 #5
Problem solved, many thanks to both responders.
-----Original Message-----
Type
Imports Microsoft.visualbasic.interaction

at the top of ur program.
"Angel Salamanca" <an***************@telefonica.net> wrote in messagenews:05****************************@phx.gbl...
Hello all,

Just downloaded the .NET SDK and, to test it works, I
write this "Hello world" code:

Option explicit

Imports System

' A "Hello World!" program in Visual Basic.

Module Hello
Sub Main()
Microsoft.VisualBasic.Interaction.MsgBox("Hello, world!") End Sub
End Module

It compiles fine and works. Now I replace the MsgBox
sentence with just

MsgBox("La vamos a liar")

and the compiler does not like it. It tells me 'Name
MsgBox is not declared'. So is not the import statement
working?

Given this symptom, what could be the problem?

Regards

.

Nov 20 '05 #6
Problem solved, many thanks to both responders.
-----Original Message-----
Type
Imports Microsoft.visualbasic.interaction

at the top of ur program.
"Angel Salamanca" <an***************@telefonica.net> wrote in messagenews:05****************************@phx.gbl...
Hello all,

Just downloaded the .NET SDK and, to test it works, I
write this "Hello world" code:

Option explicit

Imports System

' A "Hello World!" program in Visual Basic.

Module Hello
Sub Main()
Microsoft.VisualBasic.Interaction.MsgBox("Hello, world!") End Sub
End Module

It compiles fine and works. Now I replace the MsgBox
sentence with just

MsgBox("La vamos a liar")

and the compiler does not like it. It tells me 'Name
MsgBox is not declared'. So is not the import statement
working?

Given this symptom, what could be the problem?

Regards

.

Nov 20 '05 #7
Cor
Hi Angel,

Most of the visitors here are using Visual.Studio Net,
I am not sure if you are using that.

But you can try

Option explicit

Imports System Imports Microsoft.Visual.Interaction
Module Hello
Sub Main() MsgBox("La vamos a liar") End Sub
End Module


Will maybe work, but I am not sure of that, because I never did compile
withouth Visual.Studio.Net (when you are using it, this will as far as I can
see now give no problem).

I hope this helpst,

Cor
Nov 20 '05 #8
Cor
Hi Angel,

Most of the visitors here are using Visual.Studio Net,
I am not sure if you are using that.

But you can try

Option explicit

Imports System Imports Microsoft.Visual.Interaction
Module Hello
Sub Main() MsgBox("La vamos a liar") End Sub
End Module


Will maybe work, but I am not sure of that, because I never did compile
withouth Visual.Studio.Net (when you are using it, this will as far as I can
see now give no problem).

I hope this helpst,

Cor
Nov 20 '05 #9
"Angel Salamanca" <an***************@telefonica.net> schrieb
Hello all,

Just downloaded the .NET SDK and, to test it works, I
write this "Hello world" code:

Option explicit

Imports System

' A "Hello World!" program in Visual Basic.

Module Hello
Sub Main()
Microsoft.VisualBasic.Interaction.MsgBox("Hello, world!")
End Sub
End Module

It compiles fine and works. Now I replace the MsgBox
sentence with just

MsgBox("La vamos a liar")

and the compiler does not like it. It tells me 'Name
MsgBox is not declared'. So is not the import statement
working?

Given this symptom, what could be the problem?


You do not import Microsoft.VisualBasic.Interaction, you only import System.
Msgbox is not a member of Sytem.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #10
"Angel Salamanca" <an***************@telefonica.net> schrieb
Hello all,

Just downloaded the .NET SDK and, to test it works, I
write this "Hello world" code:

Option explicit

Imports System

' A "Hello World!" program in Visual Basic.

Module Hello
Sub Main()
Microsoft.VisualBasic.Interaction.MsgBox("Hello, world!")
End Sub
End Module

It compiles fine and works. Now I replace the MsgBox
sentence with just

MsgBox("La vamos a liar")

and the compiler does not like it. It tells me 'Name
MsgBox is not declared'. So is not the import statement
working?

Given this symptom, what could be the problem?


You do not import Microsoft.VisualBasic.Interaction, you only import System.
Msgbox is not a member of Sytem.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #11
* "Angel Salamanca" <an***************@telefonica.net> scripsit:
Just downloaded the .NET SDK and, to test it works, I
write this "Hello world" code:

Option explicit

Imports System

' A "Hello World!" program in Visual Basic.

Module Hello
Sub Main()
Microsoft.VisualBasic.Interaction.MsgBox("Hello, world!")
End Sub
End Module

It compiles fine and works. Now I replace the MsgBox
sentence with just

MsgBox("La vamos a liar")

and the compiler does not like it. It tells me 'Name
MsgBox is not declared'. So is not the import statement
working?


Alternatively you can specify the imports when calling "vbc.exe"
("/imports:..."). Just type "vbc.exe" and see its command line
parameters.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #12

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

Similar topics

354
by: Montrose... | last post by:
After working in c# for a year, the only conclusion I can come to is that I wish I knew c. All I need is Linux, the gnu c compiler and I can do anything. Web services are just open sockets...
10
by: Rich Hephner | last post by:
Why isn't this working? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html;...
3
by: | last post by:
For a given web form, I want to know what the +simplest+ way to add an attribute to all of a particular control type on that page. For example, I might want to add an onClick attribute to all...
0
by: Angel Salamanca | last post by:
Hello all, Just downloaded the .NET SDK and, to test it works, I write this "Hello world" code: Option explicit Imports System ' A "Hello World!" program in Visual Basic.
82
by: Eric Lindsay | last post by:
I have been trying to get a better understanding of simple HTML, but I am finding conflicting information is very common. Not only that, even in what seemed elementary and without any possibility...
34
by: Tom | last post by:
I'd greatly appreciate advice and code snippets on how to create a ram disk within a C/C++ program. I also need to be able to determine the free space. Thanks in advance for any help.
14
by: prasadjoshi124 | last post by:
Hi All, I am writing a small tool which is supposed to fill the filesystem to a specified percent. For, that I need to read how much the file system is full in percent, like the output given...
43
by: davidkoree | last post by:
I mean not about cookie. Does it have something to do with operating system or browser plugin? I appreciate any help.
0
by: Rico | last post by:
The simplest php webapp ever http://morecute.com
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.