For
Look here
Developer's Introduction to Web
Parts: Sample Code
Search http://www.microsoft.com/downloads/ for "Web Parts Sample Code."
Windows SharePoint Services
Software Development Kit (SDK)
Search http://www.microsoft.com/downloads/ for "SharePoint SDK."