# Visual Basic Programming Code Examples

## Visual Basic > Forms Code Examples

### Limit input in a textbox to certain characters

C Programming to Multiply Two Matrices -
C Code to Multiply Two Matrices. How many rows in the first matrix? How many cols in the first matrix? How many rows in the second matrix? How many cols in the second matrix?

Code Get Highest Order Set Bit of Number -
Highest position of a set bit from left to right in a number is said to be highest order set bit of that number. Highest order set bit of any negative integers is 31. Since, highest order...

Program Code to Implement CockTail Sort -
C Program implements cocktail sort. Cocktail sort is a variation of bubble sort that is both a stable sorting algorithm & a comparison sort. The algorithm differs from a "Bubble Sort" in

C Program Code Concatenates two Strings -
You can 'concatenate two strings' easily using standard library function strcat() but, in this C program 'concatenates two strings' manually without using 'strcat()' function. Calculate the

C++ Implementations Binary Search Tree -
Insert x into the tree; duplicates are ignored. Remove x from the tree. Nothing is done if x is not found. Find the "smallest item" in the tree. Find the "largest item" in the tree. Find

Code Finds Second Smallest of n Elements -
Linearly traverse the data array. Keep track of the "Smallest Number". Simultaneously keep updating the second smallest number also. A function to calculate second. If array element

Program to Create a Random Graph Using -
This algorithm randomly assigns a number of vertexes and edges of the graph. It connects vertexes randomly & generates cyclic, acyclic or disconnected undirected graphs. Generate

C++ Programming Merge Files and Store -
C++ program 'merge two files' and store the content of both file into another file. First file name and second file name (say file1.txt and file2.txt), then Third file name that is used to