|
-
Nov 16th, 2002, 12:49 AM
#1
Thread Starter
New Member
VB.NET vs VB.NET Pro
I am a very new newbie, having started working with VB only this morning. So be gentle, k?
I do have PHP and JS programming experience, so I have an idea of what I'm doing, and I am working through a book that I bought ("Learning Visual Basic.NET through Applications"). For those that may have the book I'm in Chapter 13, creating a system information window.
I'm having problems with this line of code:
Imports System.Management
In the code window in VB I get the squiggly blue line under it - VB doesn't recognize the namespace. This book spends an entire chapter with code based off of stuff obtained after this line of code is run, and it's repeated several times during various code listings, so I would be suprised if this code were wrong.
Just as an example of what is supposed to then be available, here is a bit of the proceeding code:
VB Code:
Public Class Form1
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
'snipped for brevity
#End Region
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim mc As ManagementClass
Dim mo As ManagementObject
mc = New ManagementClass("Win32_NetworkAdapterConfiguration")
Dim moc As ManagementObjectCollection = mc.GetInstances()
ListBox1.Items.Add("Network Information")
ListBox1.Items.Add("-------------------")
For Each mo In moc
If mo.Item("IPEnabled") = True Then
ListBox1.Items.Add("MAC Address : " & mo.Item("MacAddress").ToString())
ListBox1.Items.Add("Description : " & mo.Item("Description").ToString())
End If
Next
My question is, is the book wrong (#1) and #2, if the book is right, does this have something to do with the fact that I bought VB.NET (the ~$120 version) as opposed to VB.NET Pro that only comes with VS.NET?
Any help would be very much appreciated.
Last edited by tubedogg; Nov 17th, 2002 at 06:17 PM.
-
Nov 16th, 2002, 02:35 AM
#2
Hyperactive Member
You have to add a reference to it!
In the IDE's menu, goto 'Project', 'Add Reference...'.
In the dialog box, select the '.NET' tab
Select 'System.Management'
Hit 'Select', then 'OK'
Now, your ready to use the 'Management' namespace!
-
Nov 16th, 2002, 02:07 PM
#3
Thread Starter
New Member
Thank you for your help. It worked! 
I can't find that mentioned anywhere in my book. Seems kind of odd they would leave out such a crucial piece of information.
-
Nov 16th, 2002, 04:10 PM
#4
Hyperactive Member
Originally posted by tubedogg
Thank you for your help. It worked! 
I can't find that mentioned anywhere in my book. Seems kind of odd they would leave out such a crucial piece of information.
Yes it is, but I've seen mistakes in nearly every programming book I've read thus far.
-
Nov 16th, 2002, 05:58 PM
#5
Thread Starter
New Member
True.
I am going to write an Amazon review of this book once I finish it. So far I am not very impressed, for $49.95. Numerous typos (including one in the code in this same chapter) - more than I have ever seen in a programming book, missing information, at least one missing figure...I also am not learning as much as I would like to be. There's too much emphasis on just providing code, as opposed to explaining what it does beyond a vague general notion of "this sub executes when you click on that button".
This wouldn't be so bad (except for the last bit) but there is no way to easily contact the author, there is no errata listing on the publisher's site, and there is only a generic info@ email for the publisher, no way to report mistakes.
-
Nov 16th, 2002, 06:12 PM
#6
Addicted Member
VB.NET books
I have heaps of books on VB.NET but the best I've found ( I bought if from Amazon cos you can't get it in Australia) is the book of VB.NET by Matthew Macdonald. It says it assumes someVB knowledge but really it's for anyone. Matthew always responds to my email queries (4 or 5 so far) overnight and I would recommend this by your side if you are programming .NET
Also, Karl Moore's Visual basic.Net - The Tutorials is a great light hearted style to come to grips with VB.NET
And an essential, in my opinion, as a reference -definitely not a bedtime read at 1600 pages - is Francesco Balena MS Press 'Programming Microsoft Visual Basic .NET'
I know the cost adds up but if you are seriously programming in VB.NET, you have to have the resources.
All the best
BH
-
Nov 16th, 2002, 06:52 PM
#7
Thread Starter
New Member
Thanks for the recommendations. I picked up the above-referenced book and Beginning VB.NET 2nd Ed. by WROX when I bought the software...I've had good experiences with WROX in the past and it seemed to be well-recommended.
-
Nov 18th, 2002, 01:54 PM
#8
WROX does have a good reputation, and I've found books by O'Reilly to be pretty good.
However, the programming book business is full of scams. I actually encountered one where the 'author' had taken the documentation, paraphrased a few small sections, padded it with screen shots and wide margins, and was selling it for $60 US. They hadn't added a single sentence, and had only bothered altering the text in a few lines.
Now I try to get a look at the book before I buy it. If I flip through the book and see very wide margins, or lots of screen shots, I look for a different book.
-
Nov 19th, 2002, 11:48 AM
#9
New Member
I am a computer science grad with intermediate experience in VB, I am enthusiastic about learning .NET and focusing on VB.NET and XML… however due to the lack of books in my country, all I got was the Deitel VB.NET how to program, which is an introductory book to VB.NET.
My question is: how do u rate this book (and the Dietel series in general), and what books do you recommend to learn VB.NET for a NON-BEGINNER programmer??
Thanks a lot for you participation
Last edited by hussain316; Nov 19th, 2002 at 12:42 PM.
-
Nov 19th, 2002, 11:58 AM
#10
Sleep mode
you should rate that book yourself
umm , I recommend the book entitled "VB.NET Tips & Techniques" published by McGraw Hill /Osborne.
-
Nov 19th, 2002, 12:49 PM
#11
New Member
well .. for a beginner i guess it has lots of info, but it can be imprecise in few parts .. But generally i would rate it 4/5 for the extensive material and exercises . The C/C++ edition of "How to program" is used as a textbook in our local college, and many students are saying it is OK.
I guess it would be a nice idea to open a new forum room for programming books and Computer books in general ??? what do u think ?
-
Nov 19th, 2002, 01:24 PM
#12
Sleep mode
I don't think so , because there are always level difference betwen rater .So maybe one rate a book as excellent but it seems for others out of date.
anyways, before you buy any book , you need to know why you want to buy it ??? what level is that ??? does it solve the problem you are in ???
check this site ,you may get your need .There are some sample chapters for almost everybook .
http://www.vbip.com/resources/books/default.asp
Cheers
-
Nov 19th, 2002, 05:00 PM
#13
I looked at Deitel, and thought it more of an intro textbook. For beginners, this would be ok, but down the road you will be looking for other information. Since you say you have limitted options, that's a reasonable start.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|