VB 6 Sample Code
-
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
-
Create Table in a Database
by amoibade
This code shows you how to create a table and it's indexes in a database at run time.
-
Display UserControl properties in the Property Window
by ElementK Journals
How to display UserControl property settings in the Property Window
-
How to disable Ctrl+Alt+Del
by Abdul
This simple code shows you how to disable/enable the Ctrl+Alt+Del keys
-
Drag and Drop ListBox items
by James Crowley
How to enable the user to drag and drop items between list boxes
-
Converting RGB to HEX colour codes
by Ruan Meyer
This is a simple color converter, Using a textbox control to display the color, three text boxes for Red, Green and Blue values, also 3 sliders if the exact rgb color is not known
-
Declare public constants in a class module
by James Crowley
How to declare Public numeric constants in a Visual Basic class module
-
Create a Hot Key
by Georgi Ganchev
How to create a Hot Key for your application
-
Load/Save listboxes to a file
by Mike J
A neat bit of code to load a file into a listbox, and then save it again.
-
Count the number of records
by James Crowley
How to count the number of records in the Data Control
-
Listview SubItem Click Detection
by Kym Manson
How to detect when a Listview's subitem has been clicked.
-
Passing variable values to a form
by ElementK Journals
An Object Orientated way to pass Visual Basic variable values to a form
-
String Concatenation
by James Crowley
How to join/append two strings together in VB
-
Create a "Trial" Period
by Alex
This fairly short piece of code allows the program to check whether a trial period of any length has expired, notifying the user how many days are left. The user is given the option to register the program or just not use it any more. It uses the VB registry setting functions. Encryption can be added when saving to the registry so that almost nobody at all can use the program for longer than the trial period.
-
Printing from the WebBrowser control
by Christian Jacques
How to print a web page from the WebBrowser control
-
Compiling and executing Java Code in Visual Basic
by Obaid
If you are familiar with Java programming then you would probably know that one has to code in some text editor and then use Command Prompt to compile and run them by using the same old commands. Now that is indeed very annoying and of course there are many editor which allow you to compile and show the output of your code right there and then. Here I am going to show you how you can do this in Visual Basic. The program will ask for JDK Path and the Path of your code.
-
Evaluate string formulas in VB
by ElementK Journals
How to evaluate string formulas in VB
-
Debug ASP.NET pages using Tracing
by Julian Roberts
Demonstrates a useful debugging technique taking advantage of traces in ASP.NET.