Visual Basic examples

 

Contents


BitmapsHow to perform bitmap-related tasks such as creating a transparent bitmap, etc.
IconsHow to perform icon-related tasks such as extracting icons from a file, etc.
Common controlsAccomplishing tasks using the Windows Common Controls included with Visual Basic.
InternetHow to erform Internet-related tasks such as downloading files, etc.
MenusHow to perform menu-related tasks in Visual Basic.
ROT39 encryption Creating a weak encryption routine for encoding of sensitive material.
Displaying bitmaps as icons in explorer view With a tiny tweak of the registry your bitmap files come alive in explorer!
Filling Polygonal Regions Using ExtFloodFillone-form demo that shows how to use the ExtFloodFill API to construct a child's drawing canvas that can save and reload a picture
Manipulating Image Brightness with SetPixelVHere's an interesting bit of code by Tanner Helland that takes any image assigned to a picturebox and rapidly adjusts the image brightness.
Creating a Transparent BitmapAPIs & code to convert a bitmap into a transparent bitmap.
Bitmap info without using API'sThe Bitmap Info project demonstrates one means of obtaining from a bitmap file on the disk its image information without loading the actual bitmap.
Tiling an image across a form How to tile an image across the background of any form
Adding a VB Progress Bar to a VB StatusBar Use SetParent to merge a VB progress bar into a VB status bar
Changing Colours of a VB ProgressBarHow to change the colours of a VB Progressbar
Creating a Custom PhotoShop-Style ProgressBarCreating a Custom PhotoShop-Style ProgressBar
Creating a Common Control Status Bar via the APICreating a Common Control Status Bar via the API
ChooseFont DialogHow to display the Font dialog without using a control.
SaveAs DialogHow to display the Save As dialog without using a control.
Database searchHow to search using the Data control (DAO).
Data ComboHow to link two ComboBoxes - one with tables and another with fields.
ATMA small ATM emulator - includes a data manager form.
GatDriveType How to retrieve drive types (CD-ROM, Removeable, Network, etc...).
Path ExtensionHow to extract the path and extension from a filename.
File associationsHow to run file associations such as the default browser.
Set file time How to set a file's Date and Time.
Center a formCenter a form
Display drivesDisplays all drives on a system
pause your appPAuse your app for a period of time
Binary / DecimalBinary / Decimal conversion functions
Change wallpaperChange the windows wallpaper
Circular formMakes a form circular
Copy a text fileCopies a text file
Create an Access databaseShows how to create an Access database
Absolute path of a fileDisplays the absolute path to a file
Available coloursDisplays the available amount of colours the user has on their PC
BeepThis shows how you can make the PC speaker beep
Blinking label effectA blinking label effect
Soundcard existsDisplays whether the soundcard exists or not
Binary conversionBinary conversion example
Create a fileHow to create a file
Disable ctrl + alt + delShows how to disable ctrl + alt + del
get active window titleget active window title
add to recent docsadd to recent docs
get the amount of colors availableget the amount of colors available
show amount of lines in a multi line textboxshow amount of lines in a multi line textbox
Associate a file extension with an applicationAssociate a file extension with an application
beeping noisebeeping noise
is mouse present and how many buttonsis mouse present and how many buttons
messagebox using API callsmessagebox using API calls
log off windowslog off windows
hide the taskbarhide the taskbar
hide the mouse cursorhide the mouse cursor
Displays the computer nameDisplays the computer name
highlight text in a text boxhighlight text in a text box
display time in forms captiondisplay time in forms caption
analog clock exampleanalog clock example
various date and time functionsvarious date and time functions
leap year functionsleap year functions
more leap year functionsmore leap year functions
get absolute path of a fileget absolute path of a file
display all drives on systemdisplay all drives on system
change drive namechange drive name
write to a filewrite to a file
open a file in notepadopen a file in notepad
create a word documentcreate a word document
move a foldermove a folder
opens find files dialog boxopens find files dialog box
file system object examplefile system object example
Display the filesystem of a driveDisplay the filesystem of a drive
checks whether a file existschecks whether a file exists
deletes a folderdeletes a folder
deletes a folder using fsodeletes a folder using fso
deletes a filedeletes a file
create a filecreate a file
creates a text file using the fsocreates a text file using the fso
copies a text file from one location to anothercopies a text file from one location to another
box gradientbox gradient
bubble effectbubble effect
circular formcircular form
transparent formtransparent form
Change the windows wallpaperChange the windows wallpaper
save wmf file as a bmp filesave wmf file as a bmp file
tile an imagetile an image
start a screensaverstart a screensaver
screen resolutionscreen resolution
lots of lineslots of lines
Send a line of chat to AOL 3Send a line of chat to AOL 3
send an AOL instant messagesend an AOL instant message
open a url in the default browseropen a url in the default browser
view the source code of a web pageview the source code of a web page
save a webpage as a filesave a webpage as a file
display when a page was last modifieddisplay when a page was last modified
launch internet explorerlaunch internet explorer
Get the internet explorer versionGet the internet explorer version
close internet connection using DUNclose internet connection using DUN
connect to internet using DUNconnect to internet using DUN
binary to decimal conversionsbinary to decimal conversions
decimal to radian conversionsdecimal to radian conversions
pound / kilo conversionpound / kilo conversion
various math functionsvarious math functions
hexadecimal to long integerhexadecimal to long integer
factorial functionfactorial function
calculate someones age functioncalculate someones age function
another calculate age exampleanother calculate age example
remove your app from the task managerremove your app from the task manager
flashing keyboard lightsflashing keyboard lights
key constantskey constants
does a soundcard existdoes a soundcard exist
play an audio fileplay an audio file
reverse a string in VB6reverse a string in VB6
generate a random passwordgenerate a random password
InStrRev exampleInStrRev example
display all processes on your systemdisplay all processes on your system
Retrieves the path your application is running from.Retrieves the path your application is running from.
app sleeps for a given timeapp sleeps for a given time
close an appclose an app
how long has windows been runninghow long has windows been running
windows directorywindows directory
system informationsystem information
swap mouse buttonsswap mouse buttons
shutdown xpshutdown xp
shutdown Windowsshutdown Windows
shutdown or restartshutdown or restart
run a wide range of windows appsrun a wide range of windows apps
rename the computerrename the computer
send a file to the recycle binsend a file to the recycle bin
printer informationprinter information
open the start menu from your appopen the start menu from your app
open or close the CD dooropen or close the CD door
list all fonts on your systemlist all fonts on your system
get computer name without APIget computer name without API
check for cookies supportcheck for cookies support