473,508 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem in ch13 VB.net step by step 2002

I'm learning Visual Basis.net 2002 edition.
12 chapters are plain sailing, but...

I run into trouble in chapter 13 (build a mortgage payment calculator).

The following line of code causes an error:

MsgBox("The monthly payment is " & Format(Abs(LoanPayment), "$#.##),
,"Mortgage")

The error message indicates an invalid .dll
I included the necessary reference to the excel library 10

The same exercise in VB 6 sbs (chapter 14) went faultlessly.

What's to be done?


Dec 25 '05 #1
6 1606
nieuwsgroepen wrote:
I'm learning Visual Basis.net 2002 edition.
12 chapters are plain sailing, but...

I run into trouble in chapter 13 (build a mortgage payment calculator).

The following line of code causes an error:

MsgBox("The monthly payment is " & Format(Abs(LoanPayment), "$#.##),
,"Mortgage")

The error message indicates an invalid .dll
I included the necessary reference to the excel library 10

The same exercise in VB 6 sbs (chapter 14) went faultlessly.

What's to be done?


Try: Messagebox.Show
Not: MsgBox (that's a vb6 function)

Chris
Dec 25 '05 #2
"I Don't Like Spam" <no@spam.com> schrieb

Try: Messagebox.Show
Not: MsgBox (that's a vb6 function)

No, it is not a VB6 function. I always use msgbox and I use VB.Net and I do
not use the compatibility library.
Armin

Dec 25 '05 #3
On Sun, 25 Dec 2005 18:28:09 +0100, "Armin Zingler"
<az*******@freenet.de> wrote:
"I Don't Like Spam" <no@spam.com> schrieb

Try: Messagebox.Show
Not: MsgBox (that's a vb6 function)

No, it is not a VB6 function. I always use msgbox and I use VB.Net and I do
not use the compatibility library.
Armin


Eh?

If I write

MsgBox("Test1")
MessageBox.Show("Test2")

it will show up as

Interaction.MsgBox("Test1", MsgBoxStyle.OkOnly, Nothing)
MessageBox.Show("Test2")

in .Net Reflector.

"Interaction.MsgBox" as in "Microsoft.VisualBasic.Interaction".

and if I press F2 and search for MsgBox, there is only one
such function.

So how can you say you are not using the compatibility library?

If not "Microsoft.VisualBasic.*", what do you consider
to be the compatiblity library?

TIA,

Joergen Bech

PS: I try consciously to avoid anything in the Microsoft.VisualBasic.*
hierarchy in order to do everything the .Net way. I know full well
that if I use anything from that hierarchy, I will go through another
layer, potentially affecting performance. I am guilty, though, of
always using MsgBox instead of MessageBox.Show. It is just
faster to write and some habits are hard to break.


Dec 25 '05 #4
"Joergen Bech @ post1.tele.dk>" <jbech<NOSPAMNOSPAM> schrieb:
If I write

MsgBox("Test1")
MessageBox.Show("Test2")

it will show up as

Interaction.MsgBox("Test1", MsgBoxStyle.OkOnly, Nothing)
MessageBox.Show("Test2")

in .Net Reflector.

"Interaction.MsgBox" as in "Microsoft.VisualBasic.Interaction".

and if I press F2 and search for MsgBox, there is only one
such function.

So how can you say you are not using the compatibility library?

If not "Microsoft.VisualBasic.*", what do you consider
to be the compatiblity library?
"Microsoft.VisualBasic.Compatibility.dll".
PS: I try consciously to avoid anything in the Microsoft.VisualBasic.*
hierarchy in order to do everything the .Net way.


Well, I wonder why you are still using VB.NET instead of IL assembler, which
is much closer to .NET than VB.NET and C#.

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

Dec 25 '05 #5

---snip---
So how can you say you are not using the compatibility library?

If not "Microsoft.VisualBasic.*", what do you consider
to be the compatiblity library?


"Microsoft.VisualBasic.Compatibility.dll".


I stand corrected. Never made a reference to that file, so I
never noticed it.
PS: I try consciously to avoid anything in the Microsoft.VisualBasic.*
hierarchy in order to do everything the .Net way.


Well, I wonder why you are still using VB.NET instead of IL assembler, which
is much closer to .NET than VB.NET and C#.


hehe ... Nah, that would be going a bit too far. Let me put it another
way: Often I need to translate code between VB.Net and C#.
Coming from many years of VB4/5/6, I sometimes had problems
figuring out the equivalent way of writing something in C#, so I
try to find the constructs that are present in both languages and
ditch the VB6-inspired functions from my vocabulary.
Including those in the default Microsoft.VisualBasic.* hierarchy.

/JB

Dec 25 '05 #6
"Joergen Bech @ post1.tele.dk>" <jbech<NOSPAMNOSPAM> schrieb
So how can you say you are not using the compatibility library?

If not "Microsoft.VisualBasic.*", what do you consider to be the
compatiblity library?

As it's been stated in the meantime:
Microsoft.VisualBasic.Compatibility.dll
Armin

Dec 25 '05 #7

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

Similar topics

1
11767
by: Steve Thorpe | last post by:
Hi. I have two sql servers and have ran exec sp_addlinkedserver 'ACSPSM', N'SQL Server' to link one to the other and also vise versa. Each server has two users permissioned. My problem is...
1
1941
by: Emilio | last post by:
(MS Access 2002) Hello, I'm working with some big Census (PUMS) files, and I run into a peculiar problem once the data field exceeds five integers. I'll explain every step, since I am doing it in...
8
2234
by: Ishbel Kargar | last post by:
Since upgrading from old laptop (Windows 98) to new laptop (Windows XP), my mail-merge letters are doing strange things with date formats. For instance, my reminder letter for lapsed subs carries...
1
949
by: Dabz | last post by:
Hiya, I bought Visual C#.NET a couple of years ago (2002), and bought Microsoft's Visual C#.NET Step by Step book... Now, I've read through the windows forms part of the book, I've upgraded to Win XP...
7
1747
by: Ken Allen | last post by:
OK, for a number of reasons I have needed to begin experimenting with resources sooner than I had planned (I had avoided it for now). Step 1: I built the 'reseditor' application that is in the...
2
1710
by: clr | last post by:
I'm Using Windows XP and Visual Basic .Net 2002. When I press F5 <Debug/Start>, repeatedly, the program does not always function. However if I consistently press F11 <Step into> and then press F5...
7
1731
by: Metal Rabbit | last post by:
Hi guys I'm needing to create a fairly complex TreeView, but am faltering on a very basic step (as you will gather, I'm new-ish to .net). Simplified, I can't get the creation of two nodes...
7
2631
by: Frank Maxey | last post by:
I am fairly new to VB.Net and am having a curious problem. I have an entry dialog form called from a main form. The calling form needs to check the DialogResult field for an OK response. In...
3
1383
by: David | last post by:
I have learned a great deal creating applications in Access 2002 with Visual Basic code. What is the next step to create applications that can be used as a more stand-alone app or possibly with a...
0
7129
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
7333
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7398
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...
1
7061
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
5637
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,...
0
4716
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3208
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3194
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.