Click to See Complete Forum and Search --> : Visual Basic Can Do Anything Windows Needs
DarkPhoenix
Jan 13th, 2010, 01:58 AM
I am posting this here because I don't know how appropriate this is for the Visual Basic forum, as it seem to me to be based on opinion.
I am studying a popular Visual Basic 2008 book and the author flat out makes this statement,
" Anything that Can be done in Windows, Can be done in Visual Basic. "
To me, this would mean also,
- any program I could want to write for Windows in C# or C++ Can be done in Visual Basic.
Is the author wrong or is this really a fair assessment?
If so, why would I ever actually need to learn anything else besides Visual Basic ?
Nightwalker83
Jan 13th, 2010, 02:21 AM
Well, as stated by techgnome in another thread:
.NET is .NET is .NET .... pick a language and use it. If you are more familair with VB, then go with VB.NET... if you're more comfortable with C/C++, then go with C#.NET. Once you get past the language syntax, they are virtually the same in that it's all based on the framework. VB tends to be more verbose and it's structure lends itself to picking things up quickly (which is part of it's charm). There is very little one language can do that the other can't.
-tg
I agree with what TG is saying!
Edit:
I reckon the General Developer Forum is the right place for this thread.
mendhak
Jan 13th, 2010, 03:34 AM
He's comparing an OS with a language? That's like saying "Anything that can be done in the UK, can be done in Swahili"
Merrion
Jan 13th, 2010, 04:43 AM
Is the author wrong or is this really a fair assessment?
The author is wrong (or over-generalising).
Some things are not suited to a managed runtime (the CLR) such as device drivers, executable debuggers and anything that relies on injection or windows hooks.
Hack
Jan 13th, 2010, 06:44 AM
I reckon the General Developer Forum is the right place for this thread.Agree and thanks for the heads up. :thumb:
Moved
DarkPhoenix
Jan 13th, 2010, 07:53 AM
The author is wrong (or over-generalising).
Some things are not suited to a managed runtime (the CLR) such as device drivers, executable debuggers and anything that relies on injection or windows hooks.
What's CRL?
I doubt I will ever want to write a debugger or a driver (but one never knows) - Could you explain to me more about " anything that relies on injection or windows hooks " and perhaps give me some examples.
You say, "Not Suited" does this mean it cannot be done or it's just very hard to do?
I think it's important that I understand the limitations of the language to help plan my projects accordingly - don't wanna spend hours trying to do something one way then come to find out it's not possible.
EDIT: I have found some info here on windows hooks and .Net :http://msdn.microsoft.com/en-us/magazine/cc188966.aspx - Cutting Edge: Windows Hooks in the .NET Framework.
Whats the difference between this and what you are talking about?
Found the answer to what is a CLR - common language runtime
And also info here: http://sumedh.shende.googlepages.com/windowshooks
In Visual Studio, I have the ability to mix and match C# or C++ and VB (so I have read).. so is it possible to find sample code for the hook I want and insert that into my VB project?
And here: http://support.microsoft.com/kb/319524 How to set a hook in Visual Basic.
(Perhaps this should be it's own thread) Also I found SpyWorks. http://www.hallogram.com/spyworks/
" Many programmers have been able to make the leap to Windows because of the way VB protects one from dealing with the innermost workings of Windows itself. SpyWorks makes it possible for the VB programmer to accomplish tasks that were previously difficult or flat out impossible without writing custom DLLs and controls in C or C++.
SpyWorks is aimed at the intermediate to advanced Windows programmer. Dan Appleman wrote SpyWorks and recommends using his book, the Visual Basic Programmer's Guide to the Win32 API as a supplementary text for working with SpyWorks. "
Does anyone use extra tools like this to help VB's limitations? Perhaps I should ask.. Should I use things like this if need be?
( Ah Ha! While searching for info on this topic by Googeling "windows hooks and visual basic" I see Google has already picked up this thread on page 2! - Gotta love that Google)
NightWalker83, I really liked your answer :-)
(Thanks Hack for moving this where you feel it belongs BTW... )
JuggaloBrotha
Jan 13th, 2010, 09:31 AM
What's CRL?CRL? I don't know but the CLR is the Common Language Runtime, it's what runs the MSIL code that is your program. In .Net when you compile your VB.Net/C#/C++.Net/J#/F# program it gets compiled to MSIL (Microsoft Intermediate Language).
techgnome
Jan 13th, 2010, 09:47 AM
In Visual Studio, I have the ability to mix and match C# or C++ and VB (so I have read).. so is it possible to find sample code for the hook I want and insert that into my VB project?
Not quite.... Once you create a VB Project, all the code in that project needs to be VB. If you start a C# Project, the code needs to be C# (rumor has it that may change at some point in the future, but at the moment, you can't mix and match languages within a project.)
BUT
...
What you CAN do, is within a SOLUTION mix and match your projects. So you could have a project with all your UI elements done in VB.NET, and then have a data access project that uses C#... it will all work very nicely. It is only within a single project that you can't mix languages.
-tg
abhijit
Jan 13th, 2010, 10:18 AM
Not quite.... Once you create a VB Project, all the code in that project needs to be VB. If you start a C# Project, the code needs to be C# (rumor has it that may change at some point in the future, but at the moment, you can't mix and match languages within a project.)
BUT
...
What you CAN do, is within a SOLUTION mix and match your projects. So you could have a project with all your UI elements done in VB.NET, and then have a data access project that uses C#... it will all work very nicely. It is only within a single project that you can't mix languages.
-tg
And none of this can happen if you're using an Express Edition. :o
Shaggy Hiker
Jan 13th, 2010, 10:20 AM
There are other limitations on VB, most notably speed. As computers get faster, this limitation will become less and less significant, but if you want to do the absolute fastest graphics, then you need to work in something like unmanaged C/C++.
DarkPhoenix
Jan 13th, 2010, 11:07 AM
JuggaloBrotha - Thanks for the detailed explanation for the Common Language Runtime and MSIL. That explains it better than what I have found so far.
techgnome - Hubba Hubba. That is awesome info. I don't know that I will ever want to learn any version of C but now I know how to solve some C related problems I may encounter.
abhijit - Not to worry. I have Express and Professional Editions. I have found many Great free e-books on the net for both. I started with the Visual Studio Express Edition and on commenting about this to family over the holidays, It turns out I have an Aunt who bought a copy of Pro for my cousin as a gift.. He was never interested in it and it was offered to me :-)
Still I thought I would learn what I could on Express first before I tackled the finer features of Pro.
Shaggy Hiker - I do play a lot of graphics intense games but I don't think I will be using too many graphics in my applications. Thanks for the heads up though.. all VB knowledge I can find will come in handy at some point I am sure.
Thanks Bunches Guys!
esposito
Jan 13th, 2010, 02:53 PM
Originally Posted by techgnome:
.NET is .NET is .NET .... pick a language and use it. If you are more familair with VB, then go with VB.NET... if you're more comfortable with C/C++, then go with C#.NET. Once you get past the language syntax, they are virtually the same in that it's [correct] all based on the framework. VB tends to be more verbose and it's [wrong] structure lends itself to picking things up quickly (which is part of it's [wrong] charm). There is very little one language can do that the other can't.
tg
Doesn't techgnome know the difference between a possessive adjective and the verb "to be"?
dilettante
Jan 13th, 2010, 03:15 PM
Aside from that my understanding is that there actually are significant differences between VB.Net and C#, though they may not make much difference for most programming. Unsafe C#, some of the extra VB-oriented namespaces, etc.
At the same time it sounds as if the differences will continue to be minimized in future releases of the products.
But I agree that the book author in question was just stretching the point.
DarkPhoenix
Jan 13th, 2010, 03:21 PM
Doesn't techgnome know the difference between a possessive adjective and the verb "to be"?
That's real cute. I guess we can give the teacher an apple (not computer). But techgnome was typing out his sentences like Americans normally speak. I believe grammar is WAY overrated and this is the way people should talk to each other in an impersonal forum where like language is commonly understood.
English has tons of errors like this where the rules of proper grammar does not reflect the spoken language. For the most part, you can toss the grammar book out the window....accept when your coding.
(Sorry I know.. way off topic but I couldn't resist myself)
Thanks dilettante I will keep that in mind also.
techgnome
Jan 13th, 2010, 03:35 PM
esposito - Wow... Seriously? THAT is what you're going to pick on out of this thread? Yes I know the difference. Really, thats what weave reduced this thread too? Nit piking others grammar? Its a good thing your around, eyed hate to be going around with my possessive contractions when I should be using contracting possessives.
Dark - it's not just Americans, that is actually a general phenomenon. One that is starting to go by the way side with people using "text-speak" - have you SEEN some of the posts here? Some days it's [correct!] bad enough to make me want to cry in dismay as some are future professional developers. It's [correct!] no wonder why we're kept away from the end users.
I know the difference between it's, its, there, their, were, we're, where, ware, to, too, two. However, sometimes when typing things out quickly, I make mistakes. So what?
-tg
dilettante
Jan 13th, 2010, 04:03 PM
Yeah, if we going to start grading on grammar we're doomed! :p
I am far from insensitive to it myself though. There seems to be a problem in the UK with prepositions that drives me nuts. They seem to think that "to" is a universal preposition, which can lead to some awkward and clumsy to read text:
How different is Windows 7 to Windows XP?
In case you're wondering, "to" should be "from" but you wouldn't know it from reading UK blogs and such, let alone forum posts. I even hear this in BBC broadcasts so I assume it is epidemic to the point where everyone has given up. Journalism doesn't seem to have basic literacy as a prerequisite anymore anyway though.
It does make me wonder a bit however. A vast number of programming forum posts are completely redundant because even a cursory reading of the documentation would have answered the question immediately. My own suspicion is that people just can't read technical material at a sufficient comprehension level, yet they want to be programmers.
Migration and globalization mean we face growing challenges. I was raised and schooled in US English myself, but I studied three other languages in my academic career giving me some feel for the challenges I'd face myself if the situation were reversed.
This would tend to enhance my level of empathy were it not for the fact that reading speed, comprehension, and a rich vocabulary were emphasized as being key to success while I was in school. Why did I bust my rear only to be expected to give everyone else a free pass now?
Well I can answer that myself: "Get over it buddy. Things have changed."
It's either that or sit on the front porch waving my cane at those darned kids who keep trampling on my lawn.
techgnome
Jan 13th, 2010, 04:09 PM
My own suspicion is that people just can't read technical material at a sufficient comprehension level, yet they want to be programmers.
My personal experience is that some don't know how to search properly. They don't realize they can go to MSDN (which has improved ALOT since .NET) and type in "Class.Method" and get what they need within the first 5 results or so. Or sometimes, the terms they are searching on aren't quite right (usually because they aren't experienced enough to know what to look for.)
-tg
EDIT - we are WAAAAY off topic now.
DarkPhoenix
Jan 13th, 2010, 06:00 PM
A vast number of programming forum posts are completely redundant because even a cursory reading of the documentation would have answered the question immediately. My own suspicion is that people just can't read technical material at a sufficient comprehension level, yet they want to be programmers.
.
Let me tell you what I love. You know that little tiny red X button next to the error box at the bottom of the screen.. when you right click on it you can go right to help just for that error. That tiny X is my best friend.
I found that out of desperation clicking on everything to try to find out why I was getting an error I couldn't understand.
One thing I have to say.. Visual Studio comes jam packed with tons of help and if you use the MSDN Library - even better. There are so many help resources built into and out there for Visual Basic.. I could not be happier in my choice of a language to learn.
I see people on the net say things like VB sucks.. I just cannot understand where they are coming from.
I have access to 14 different books on VS and VB, express and Pro editions - some with downloadable code from the publisher,,, If anyone does not have a good excuse not to become a good programmer for lack of information.. it's me.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I will quote technome "EDIT - we are WAAAAY off topic now. "
I feel this way.. I started the topic.. it's cool with me. In the course of discussing a topic the topic often turns to other subtleties - a branch of the main topic. I do not feel this should be looked down on especially if the original poster is involved. I believe this needs to be taken into consideration by the Mods. If the topic spurned a lively discussion that leads to other related things.. Let it stand and not close or move the thread for being off topic.
I have learned a lot reading threads in this way that are not so harshly moderated. If you ask How and someone answers it fine.. but then someone asks Why and that's good too.. it broadens the understanding on the topic as a whole.
EDIT: ER.. technically, that was way way off topic.. but I believe the point was valid and needed to be made since we are talking about things related to my OP.
* technome, Please message me something with information on: "Use Offensive Programming, not Defensive Programming." I find this an interesting concept I would like to explore. If it's supposed to be showing up as a hyperlink in your sig file.. it's not working.
szlamany
Jan 13th, 2010, 06:23 PM
....accept when your coding.
Except?
Accepted?
At any rate...
It's all your syntax preference if we are talking about VB vs C.
I happen to be fluent in VB - which makes it easy for me to do stored procedures in T-SQL - which if you develop database applications is a large part of your life.
I also have to work on a 2500 line JAVASCRIPT function that I'm supporting - that's in some crazy C-like syntax and I struggle every time I have to work on it.
Who the heck ever thought of taking a simple NOT and making it a ! character.
Shaggy Hiker
Jan 13th, 2010, 06:45 PM
If the topic spurned a lively discussion
:lol:
Lots of the people running down VB come from one of two perspectives. The set that specifically runs down VB.NET rather than all of VB, tend to be people who REALLY loved VB6. I thought it was a great language, and wrote in it for years, but when I learned .NET, I never went back, nor would I want to. However, some people don't want to move away from VB6, and a rare few (Esposito for one) have sound reason not to move (not counting the thousands who are supporting code written in VB6 who have no choice in the matter).
The other group tends to be people coming from C/C++. VB was long considered a toy language, while REAL programmers wrote in C/C++, or even ASM. There was a certain amount of justification to that, as there were plenty of things that couldn't be done at all in VB, or couldn't be done well, but the attitude was kind of silly considering the HUGE number of apps written in VB6. Still, that attitude has lingered, even as .NET has filled in most of the deficiencies that existed in VB6, and JAVA has proven that real programming had better include programs that are byte code based.
There may also be a group that denigrates VB simply because it is a Microsoft language, whereas C/C++ are both open standard languages.
As a general rule, though, all those groups are p....spitting into the wind. Ultimately, form must follow function. VB.NET is more functional than VB6 or C/C++ in most cases simply because the time to usability is so low (versus C/C++), yet the capability is so high (versus VB6).
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.