Sample Code
-
Permanent 301 Redirect with QueryString in IIS
by James Crowley
If anyone's ever tried to move domain, you'll know its a pain. One way to make things a little easier is to provide an automatic 301 redirect from your old domain to your new one - this marks the new destination as a permanent change, and will generally be picked up by search engines. This shows you how to do this redirect with IIS, passing the full path and query strings along too.
-
Cross page postbacks in ASP.NET 2.0
by Brock Allen
ASP.NET 2.0 introduces the ability to have an ASPX page postback to a different ASPX page with cross page postbacks. This was done all the time in ASP but wasn’t supported in ASP.NET 1.x. Here we show you how to use this new feature.
-
Converting an Excel file to Tab Delimited Format
by Vipin Mohandas
Demonstrates how to use the Excel object model to load an excel file and convert it to tab delimited format.
-
How to delete records with SqlCommand
by Edward Tanguay
This code shows you how to delete records with an SQL statement and get the number of records deleted returned back as an integer.
-
Inserting images into Word documents using XML
by Jonathan Greensted
I've seen many, many requests on the Microsoft newsgroups asking how you can insert a picture into a Word document without saving it to the file system first. This example application described in this blog illustrates both methods for inserting a picture firstly using the Word object model (InlineShapes.AddPicture) and secondly using Word's XML support (InsertXML).
-
Read Registry values in VB without API
by ElementK Journals
How to read Registry values in VB without complex API calls
-
Msgbox Example
by James Crowley
This demonstrates displaying some message boxes using MsgBox
-
Date And Time Validation Functions
by Hari K
This function is used for VB.Net developers. It is useful for Date validate when the date format is "dd/MM/yyyy" or "dd/MMM/yyyy". Time validation is also useful for Validating the given time in the format of "HH:mm:ss"
-
Execute a Process and Fetch its Output
by James Crowley
Demonstrates how to redirect the output of a shell program (such as a batch file) so you can fetch the text it returns.
-
I need a time-out!
by Wouter van Vugt
I need a time-out! Or more specifically, my methods need a time-out mechanism. And because I spent seven projects and quite some time on the web trying to find out how to do it correctly, I am writing this small article about the works.
-
Preserve with ReDim
by James Crowley
How to use Preserve and the ReDim statement to resize arrays whilst preserving existing items
-
Output text to a form
by James Crowley
An example of how to 'print' text onto a form.
-
Running total in an SQL query
by James Crowley
How to create a running total column in an SQL query
-
UBound() and LBound()
by ElementK Journals
Using LBound() and UBound() when iterating Visual Basic arrays
-
Counting lines in a multi-line textbox
by ElementK Journals
How to count the number of lines in a multi-line textbox
-
Basic ADODC Example
by Moriel Schottlender
Too all you newbies out there, This is something I wrote for a friend of mine, teaching how to use the basic extraction-from-db utilities. It shows how you can link an Access database using the ADODC Component. It includes thorough explanations and examples. It really is teaching the basics of ADODC components - nothing fancy - I just remembered my own time as a beginner, trying to search for new ways to learn. I hope it will help you :) ~moo
-
Adding a Find Button to an Excel Worksheet
by gravitycure
Place a 'Find' button on an Excel Worksheet, which finds the text in a given text box.
-
Wrap text in a label control
by Nick Avery
Frustrated with the label control's inability to wrap text? Use this bit of code and worry no more...
-
How to display Visual Basic forms dynamically
by James Crowley
How to display a VB form without know it's name at design time
-
Simulating Mouse Events
by Dominique
A Mouse Move module letting you simulate the user moving the mouse