Free Programming Tutorials & Source Code

  • PDF
  • Print

Welcome to the Scripts Library!

  • Thursday, 12 October 2006 05:00
  • Last Updated ( Tuesday, 16 June 2009 18:15 )
  • Written by Administrator
The purpose of this Site is to let you share your code, scripts, tutorials and useful materials with other developers. Whether you're looking for information to assist you in developing a specific project or simply want to learn how to start writing your very first code, you will find a wealth of quality, free information on this web site to assist you.

If you sign-up as a member, you will get an access to our library, browse and download any script you may find it useful for you. Also, we appreciate your contribution of scripts and other valuable information. You can also post messages, comments, and request newsletters regarding latest scripts, updates, events, and more. This is free of charge. Don't worry, we care about your privacy!
  • PDF
  • Print

Auto-Fill ComboBox Using C#

  • Tuesday, 30 June 2009 01:35
  • Last Updated ( Tuesday, 30 June 2009 02:08 )
  • Written by Feras
This is simple code of how you fill a combobox automatically in C#.
First, lets bind the combo with some data:

Read more: Auto-Fill ComboBox Using C#

  • PDF
  • Print

Using OleDbCommand to Insert New Record in VB.NET

  • Sunday, 28 June 2009 18:10
  • Last Updated ( Sunday, 28 June 2009 18:21 )
  • Written by Feras
Here is a simple code to insert a new record into a MS Access database using the OleDbCommand Object in VB.NET.

Read more: Using OleDbCommand to Insert New Record in VB.NET

  • PDF
  • Print

Using DataReader in VB.NET

  • Friday, 26 June 2009 20:39
  • Last Updated ( Friday, 26 June 2009 20:55 )
  • Written by Feras

In this tutorial we will work with DataReader to retrieve data from a MS Access database.
First of all, a DataReader is an ADO.NET object that provides read-only, forward-only data faster than a DataAdapter. It’s a good choice over the other objects for read-only purpose.
Also, it’s forward-only, means you cant go back to previous data which was accessed. The cursor in DataReader goes from top to button by using the Method Read.

To fill a DataReader with Data, we are going to use the OleDbCommand object and execute the result onto it.
First, we need to create a MS Access Database, with the following table in it:

Table Name: Position
Fileds:
ID, Number, Primary Key
Position, Text(50)

Read more: Using DataReader in VB.NET

  • PDF
  • Print

Progressbar in C#

  • Friday, 26 June 2009 17:46
  • Last Updated ( Friday, 26 June 2009 17:59 )
  • Written by Feras
The Progressbar Class is a part of the .NET framework, which provides progress bar control that can enhance your functionality of your application.
In this tutorial, we are going to use three members of the Progressbar class:
Minimum, Maximum, and Value.
The value should range between the minimum and maximum.

Create a new C# Application. Add the following controls to the main form:
Progressbar control, name it as pb.
Timer, name it as tr

progress bar

Read more: Progressbar in C#

  • PDF
  • Print

Bind an ADO.NET DataTable to a TreeView in VB.NET

  • Thursday, 25 June 2009 18:21
  • Last Updated ( Thursday, 25 June 2009 19:09 )
  • Written by Feras
This tutorial demonstrates how to bind an ADO.NET DataTable to a TreeView in VB.NET and MS Access database.
First of all, you need to create two tables:
Positions
positions table

Read more: Bind an ADO.NET DataTable to a TreeView in VB.NET

  • PDF
  • Print

Bind an ADO.NET DataTable to a ListBox in VB.NET

  • Thursday, 25 June 2009 14:44
  • Last Updated ( Thursday, 25 June 2009 14:55 )
  • Written by Feras
This example shows how to bind an ADO.NET DataTable to a ListBox in VB.NET and MS Access Database.
First, create a MS Access Database, and name it as db. Add an Employees table to this database:
Table name: Employees
Fields:
ID (number, primary key)
Name (text)

You can modify this Database to fit in your requirements.

Create a new windows project in Visual Studio.NET, and then add a form to this project.
Add a ListBox to the form, name is as lstEmployees.

bind listbox vb.net

Read more: Bind an ADO.NET DataTable to a ListBox in VB.NET

  • PDF
  • Print

Bind an ADO.NET DataTable to a Combobox in C#

  • Thursday, 25 June 2009 01:04
  • Last Updated ( Thursday, 25 June 2009 01:19 )
  • Written by Feras
Here is a simple code to Bind an ADO.NET DataTable to a ComboBox using C# and Microsoft Access.
Create a MS Access Database, and name it as db.
Add a new table to it:

Table name: Positions
Fields:
ID (number, primary key)
Name (text)

Create a new C# windows project; add a new form to it.
Add a ComboBox to the form, name is as cbPositions.

bindcombobox c#

Switch to View Code mode, copy and paste the following sub:

Read more: Bind an ADO.NET DataTable to a Combobox in C#

  • PDF
  • Print

Bind an ADO.NET DataTable to a Combobox in VB.NET

  • Wednesday, 24 June 2009 22:45
  • Last Updated ( Thursday, 25 June 2009 14:38 )
  • Written by Feras
This example will show you how to bind datatable to a combobox in VB.NET
Fist of all, create an MS Access database, and name it as db. Add a new table to it:

Table name: Positions
Fields:
ID (number, primary key)
Position (text)

Create a new vb.net windows project; add a new form to it.
Add a combobox to the form, name is as cbPositions.

bind combobox

Read more: Bind an ADO.NET DataTable to a Combobox in VB.NET