|
-
Sep 28th, 2004, 10:22 AM
#1
101 VB.NET examples - Updated 3-9-06 see first post
Many of you may be aware of this great set of .NET examples, but for those of you who are new to .NET, this set of 101 code samples can be a life saver when moving from VB6 to VB.NET. It is also useful for any newcomers to programming. These are all examples done by Microsoft and contain comments and descriptions. Almost anything you want to do in .NET, you will find a basic (or advanced) implementation in these examples. This was originally out when .NET 2002 was released, but all samples have been updated to .NET 2003. Here are a few of the cool samples included.
1) Windows Forms - XP Theme Support
2) Windows Forms - How-To Use Drag and Drop
3) Windows Forms - How-To DataGrid Sorting and Filtering
4) Windows Forms - How-To System Tray Icon
5) Web Development - Data Entry Form
6) UPGRADE SAMPLE - FORM CLOSING AND SAVE CHANGES
7) UPGRADE SAMPLE - FILE EXPLORER
8) Security - Use Cryptographic Hash Algorithms
9) NET Framework - Use Temporary Files
10) Language - How-To OO Features
11) Advanced .NET Framework (GDI+) - Animation with GDI+
12) Advanced .NET Framework - Interacting with a Windows Service
13) Advanced .NET Framework - Make WIn32 API Calls
14) Advanced .NET Framework (GDI+) - Use GDI+ to manipulate images
15) Data Access - Retrieve and Process data with a SQL Data Reader
These are just a few of the great examples you will get.
Click here for download page
03/09/2006 UPDATE
VBFORUMS member moeur pointed out the 101 VB.NET examples for 2005 link no longer works, and MS has listed a bunch of 2005 code samples in the MSDN which can be found in the link below
Click here for download page
I haven't looked at it myself yet, as I am not using 05 just yet, but I imagine its the same set of samples, just updated using the 2.0 framework (perhaps differences in coding where they apply)
Edit: 11/11/2005. I will be removing some of the posts from here since this is such a valuable sticky to have in this forum. I will leave all posts related to trouble shooting, but I will be removing any of the posts like "thanks" or "just what I needed". Not that we at VBF don't like to hear those good words, but since this is a sticky we plan to leave around a while, we dont want it to get cluttered.
Last edited by kleinma; Mar 9th, 2006 at 10:40 AM.
-
Oct 1st, 2004, 08:49 AM
#2
Can't get it to work.
It won't install the Northwiind DB that it uses:
Code:
osql -E -S (local)\NetSDK -i InstNwnd.sql
SQL Server does not exist or access denied 
I have sa and password access on my local SQL Server...how do I enter these into that code above?
oka
-
Oct 1st, 2004, 09:09 AM
#3
I think that is because the instructions are not for installing nwnd on a SQL Server, but for installing them on MSDE... I am sure there is a way to also install it on SQL Server, but I bet that is why it is not working for you.
-
Oct 5th, 2004, 05:21 PM
#4
Addicted Member
That happened to me too..
one of the things is restart your system after you install MSDE
then.. make sure your server is running... check the little icon on the system tray!!
if thats not working still.. its probably cus you already have it install in .net..
make a search for the data base.. if you find it on your system under SQL server.. you have it!!
There's only Three kinds of people in this world.....
Those that know how to count, and those that do not......
 ]
-
Jan 11th, 2005, 02:19 PM
#5
New Member
Re: 101 VB.NET examples
 Originally Posted by Wokawidget
Can't get it to work.
It won't install the Northwiind DB that it uses:
Code:
osql -E -S (local)\NetSDK -i InstNwnd.sql
SQL Server does not exist or access denied
I have sa and password access on my local SQL Server...how do I enter these into that code above?
oka
I know this is a little past the fact but maybe someone else can see this. I have had similar problems like this. In your case since you have SQL Server installed you already have a Northwinds database so installing it through the command line is unnecessary.
In other instances I've noticed that many of the connection strings in these examples use the term "localhost" as the server name.
Now I do not know exactely why but this never works for me. I have to manually change the connection string to "(local)" and then everything seems to always work.
Perhaps someone else might have more insight as to why this occurs. My best guess is because I'm running SQL on a Win XP machine rather than a server.
-
Jan 11th, 2005, 07:37 PM
#6
Re: 101 VB.NET examples
it has to do with the way you set up SQL Server when you installed it.. you must have changed some default value...
you could possibly set up an alias using the SQL Server Client and call it localhost, but in reality it maps to your (local) sql server... and then the examples should work without any modification
-
Jan 19th, 2005, 03:32 AM
#7
New Member
Re: 101 VB.NET examples
 Originally Posted by Wokawidget
Can't get it to work.
It won't install the Northwiind DB that it uses:
Code:
osql -E -S (local)\NetSDK -i InstNwnd.sql
SQL Server does not exist or access denied
I have sa and password access on my local SQL Server...how do I enter these into that code above?
oka
Try running you InstNwnd.sql file using SQL Server Query Analyzer.
Or instead of using "localhost", use the name of your computer.
I cant connect to my SQL Server using "localhost" when i used VB.NET. I tried using my computer name using the code SystemInformation.Computername as value to the data source. Now it already works!
I guess its because I'm using Win XP service pack 2.
Last edited by judyll; Jan 19th, 2005 at 03:41 AM.
-
Apr 24th, 2005, 06:06 PM
#8
Banned
Re: 101 VB.NET examples
I installed it but i can't figure out where they are! Please help!
-
Apr 24th, 2005, 06:17 PM
#9
Re: 101 VB.NET examples
It doesnt create a menu item or desktop shortcut. It should be where ever you choose to install it to.
?\...\MSDN\101 VB.NET Samples
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Apr 25th, 2005, 07:13 AM
#10
Banned
Re: 101 VB.NET examples
I know im being a pain, but i wanted to see an example of the windows forms with xp styles so i tried opening the vs file but i can't figure out which one to open.
-
Apr 25th, 2005, 11:08 AM
#11
Re: 101 VB.NET examples
You should run the "How-To XP Theme Support.vbproj" file or "How-To XP Theme Support.sln".
.vbproj and.sln extensions are the equilivalent of vb6's .vbp and .vbg.
Note: you need Windows XP and VS.NET Pro+
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 5th, 2005, 06:16 AM
#12
Re: 101 VB.NET examples
I haven't downloaded the MSI yet, but can anyone tell me if there is an example in it on how to create a Windows Service?
-
May 5th, 2005, 11:09 AM
#13
Re: 101 VB.NET examples
Advanced .NET Framework (Windows Services) - Create a Windows Service
Advanced .NET Framework - Interacting with a Windows Service
-
May 8th, 2005, 12:46 PM
#14
Re: 101 VB.NET examples
Butch, the link works for me using IE6.
Here's the href so you can type it in.
http://www.microsoft.com/downloads/details.aspx?familyid=08e3d5f8-033d-420b-a3b1-3074505c03f3&displaylang=en
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 8th, 2005, 01:07 PM
#15
Re: 101 VB.NET examples
i just tested it and it still works fine. Perhaps it was down before. Try it again.
-
May 29th, 2005, 12:57 AM
#16
New Member
Re: 101 VB.NET examples
Could someone help me with this problem? Whenever I open these examples I'm getting error:"This is not a valid visual studio solution file" and found the problem and that I have the following version and need to upgrade my vb.net. what I need to do? Is there any free upgrade for 2003 if we have 2002 version. Please let me know. Thanks in advance.
MS .NET Framework 1.0
MS Development Environment 2002 Version 7.0.9466.
-
May 30th, 2005, 07:49 PM
#17
New Member
Re: 101 VB.NET examples
orbit,
I have VS.NET and my .NET Framework is 1.1. I noticed you have 1.0, which might be the central problem here. Just a hunch, as I'm new to programming.
"Some days, even my lucky rocketship underwear won't help." ~ Calvin, of Calvin & Hobbes
-
Jun 8th, 2005, 05:16 AM
#18
New Member
Re: 101 VB.NET examples(MY problem)
I have downloaded the 101 VB.NET examples, but running into a problem when I try to execute a data access sample. Maybe one of nice guys can help me. Following are the details.
I downloaded MSDE again from the location you suggested. It was succesfull.
1. Then I insatalled it at the defualt location, which is C:\sql2ksp3|MSDE.
2. Then I installed all four databases (including Northwind) at following LOcation.
C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Samples\Setup
3. Then using 'Server Explorer' in vb.Net I checked under Servers ...SQL Servers & noticed all four databases are present. I can see the tables & data.
except I noticed all the entries had a red "X" next to it.
4.Then I tried a data access sample & also tried to create a 'Data Wizard' form & tried to connect to the database but got following message.
"An error in initializing provider[DBNETLIB][Connection Open(Connect()).] SQL server does not exist or Access Denied"
5. One more thing in system tray I can see an Icon for SQL server & when hover mouse over it I get the message
'not connected .\\'
You guys have been helpfull so far please help more. You help will be greatly appreciated.
Thanks in advance.
Thanks
-
Jun 8th, 2005, 09:03 AM
#19
Nobody knows what software they want until after you've delivered what they originally asked for.
Don't solve problems which don't exist.
"If I had eight hours to cut down a tree, I'd spend six hours sharpening my axe." --- Abraham Lincoln (1809-1865)
2 idiots don't make a genius.
-
Jun 16th, 2005, 09:46 PM
#20
Lively Member
Re: 101 VB.NET examples
hello there,
im all good cept just shy of this: Type osql -E -S (local)\NetSDK -i InstNwnd.sql
my directory is D:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Samples\Setup
any ideas?
thanks.
-
Jun 17th, 2005, 08:37 AM
#21
Re: 101 VB.NET examples
Do you have SQL Server or MSDE installed on your machine?
-
Jun 18th, 2005, 04:31 AM
#22
Lively Member
Re: 101 VB.NET examples
yup i did
> Step 1: Download and Install the Microsoft SQL Server 2000 Desktop Engine (MSDE)
installed it, is that not all?
thanks.
-
Aug 3rd, 2005, 09:49 PM
#23
Addicted Member
Re: 101 VB.NET examples
What is 101 Examples? I had installed the program. But How to access to it??
-
Aug 5th, 2005, 04:35 PM
#24
Re: 101 VB.NET examples
it installs to
C:\Documents and Settings\<user name>\My Documents\MSDN\101 VB.NET Samples
its not a program, but a directory filled with subdirectories (one for each example) and they are all the project files needed, so you open them by double clicking the sln file, and then you run them from the IDE.
-
Aug 25th, 2005, 01:45 AM
#25
Re: 101 VB.NET examples - Updated 8-5-05 see first post
For the poor sods who need it, there's also a set of VB.NET 2002 101 samples available here.
-
Oct 17th, 2005, 02:20 PM
#26
Re: 101 VB.NET examples - Updated 8-5-05 see first post
Thanks for the link, but it shows one more reasone why I'm still not touching .Net. You have two sets of examples, one for 2003 and one for 2005. When are they going to settle for one thing and leave it like that. Am I going to have to learn a new syntax every time they want to change something?
-
Oct 17th, 2005, 02:25 PM
#27
Re: 101 VB.NET examples - Updated 8-5-05 see first post
not at all... syntax has not changed.. there just happens to be a lot of new features in 2005 that were not available for 2003.
I don't know if they actually took anything OUT of 2003 going to 2005, which would mean you could open a project you did in 2003 and 2005 would migrate it over for you. You just might want to recode some areas where new features would now be useful.
Each .NET version is just a continuation off the previous... so there are a few new things to learn, but there is nothing that needs to be "unlearned" so to speak in order to start using the newer .NET frameworks.
-
Oct 17th, 2005, 02:54 PM
#28
Fanatic Member
Re: 101 VB.NET examples - Updated 8-5-05 see first post
I know some of the controls are no longer available by default in the Toolbox, but they still work....
-
Oct 31st, 2005, 07:56 PM
#29
Re: 101 VB.NET examples - Updated 8-5-05 see first post
Hey this is great more samples 
And I found some more if anybody is interested (and if anyone has not posted the same link yet)
http://www.asp.net/Default.aspx?tabindex=9&tabid=47
there are about 6 projects, I have installed 2 already (both works) and found them useful ASP .NET samples.
-
Nov 15th, 2005, 09:35 PM
#30
Re: 101 VB.NET examples - Updated 8-5-05 see first post
The 101 samples for .NET 2.0 seem not to have been updated since beta 2. I don't know whether they will be or not, but you can get language samples tested on the RTM here: VB.NET, C#
Last edited by jmcilhinney; Nov 15th, 2005 at 09:40 PM.
-
Feb 6th, 2006, 01:32 PM
#31
Junior Member
Re: 101 VB.NET examples - Updated 8-5-05 see first post
-
Mar 9th, 2006, 02:09 AM
#32
Addicted Member
Re: 101 VB.NET examples - Updated 8-5-05 see first post
 Originally Posted by oceanebelle
Hey this is great more samples
And I found some more if anybody is interested (and if anyone has not posted the same link yet)
http://www.asp.net/Default.aspx?tabindex=9&tabid=47
there are about 6 projects, I have installed 2 already (both works) and found them useful ASP .NET samples. 
Hey i couldn't find any sample downloads for ASP in this page. Can u help me to find it?
Think Before Ink
Visual Studio .NET 2002/.NET Framework 1.0
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
|