Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 28, 2013 09:19 PM by aarsh
Jan 25, 2013 08:22 PM|LINK
i am looking for a reference for the different things in visual basic. like, the different things you use for classes and things. i am new to vb, and tried using the help files, but i was looking for a quick reference. i am trying to make a console program
that gathers different info from a computer, like the os, computer name, programs installed, etc. i used my.computer.name to get the name, but have no clue where to find the rest of the information. i don't want someon to do the work for me, just point me
in the right direction. thanx,
Jan 25, 2013 09:02 PM|LINK
I appreciate your efforts. Let's see if this can mark any item as complete on your list
(I wrote and tested following , in VB Express 2010)
This code gets you installed programs (you may want to filter out those mepty strings as, there might be some programs installed on your machine with this field kept blank.
Dim registry_key As String = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
Using key As Microsoft.Win32.RegistryKey = Registry.LocalMachine.OpenSubKey(registry_key)
For Each subkey_name As String In key.GetSubKeyNames()
Using subkey As RegistryKey = key.OpenSubKey(subkey_name)
This one get you machine name :
for OS, use "OperatingSystem" :
Dim osInfo As System.OperatingSystem = System.Environment.OSVersion
Jan 25, 2013 09:32 PM|LINK
Like the guy above did, there's not another way to view your currently installed programs other than the registry as far as I know. Other things you can get by looking under the class "Environment" and under "My". For instance My.Computer.FileSystem has
a few properties and lots of functions.
The only thing I can say to do is go here and see if this helps:
Jan 26, 2013 03:51 PM|LINK
i really appreciate the help guys. but the way i learn would be to have a reference to go to, like for instance, how did you figure what the the class environment did? Or that there even was a class my.computer.filesystem? I had a class on vb, but it
was only 6 weeks, the other 6 was in python, basically just an introduction. python i get really well, from the old days of basic (1984). vb, not so much. i got one book on vb that i went through, good one too. teach yourself vb in 24 hours, by james foxall.
loved it and it taught me a lot. at this rate it'll take me years to be able to use it effectively though. the link really helped, i had it bookmarked and have been reading it for two weeks, trying to get a website contact page working. then i took a break
and said i need a base, well back to the books i guess. thanx for the help.
Jan 27, 2013 08:38 AM|LINK
then i took a break and said i need a base, well back to the books i guess.
thats a good choice, try VB unleashed - http://www.informit.com/store/visual-basic-2012-unleashed-9780672336317
Jan 28, 2013 09:19 PM|LINK
Most people use C# now a days (if you have a choice to use it) ... I have nothing to do with "C# vs. VB.net" stuff as a matter of fact they are all same mostly as long as you stay in .NET ...
For your "how did you figured out..." question, its just a matter of practice of writing the code and googling, to be hoenst with you.
All the best ...