Sunday, August 21, 2005

vb techniques:

01 Overview
02 Sample code
03 IDE
04 Syntax
05 Data types / variables
06 Operators
07 Boolean logic
08 Strings
09 Arrays
10 Conditional flow
11 Scope
12 Functions / subroutines
13 Files / Folders
14 System functions
15 Graphics
16 Sound
17 Date-Time
18 Math
19 Printing
20 Error handling
21 Controls
22 Objects
23 Databases
24 SQL
25 Limitations
26 Summary of functions
27 Windows API
28 ASCII Table
29 Collections
30 Subclassing
31 Distribution
32 Top 100

applications

Associate an extension with the app
Check regional settings
Close a second app with SENDKEYS
Create a shortcut to your app in any folder
Create desktop shortcut
Dialog - color - using API
Dialog - file - using API
Dialog - folder - using APi
Dialog - font - using API
Find default application for a file
Find prior instance of EXE
Get list of available fonts
Limit Size of Window
MRU for menus
Open Help file
Popup menu
Put app icon in system tray
Put app in Explorer context menu
Put app in SendTo menu
Show/hide mouse cursor
Simulate a mouse click
Start new application and wait for it to finish
Startup with Windows (use wshom)
Stop flickering
Test if application is running within IDE
Toggle menu checkmark

arrays

Convert an array to lower case
Cycle through an array
Deal a deck of cards
Erase an array
Randomly shuffle an array
Remove element from array by content
Remove element from array by position
Search an array
Write an entire array into a file #1
Write an entire array into a file #2

clipboard

Copy image to clipboard
Copy selection to clipboard
Copy text to clipboard

controls

All - automatically highlight content on focus
All - capture any key
All - force lower case as keys are entered
All - use Enter key to move to next control in TAB sequence
Checkbox - set with Boolean value
ComboBox - change width of drop down part
ComboBox - create MRU for dropdown list
ComboBox - remove multiple selected items
Common dialog - multiple files from common dialog
Common dialog - SaveAs code
File System Controls - how to synchronize
Imagelist - add images at run time
Listbox - use API for fast search
Listbox - use API to select all
ListView - autosize column widths
Optionbutton - determine which is selected
Picturebox - remove image
Richtextbox - find and replace
Richtextbox - first visible line/position of 1st char on the line
Richtextbox - merge contents of two richtextboxes
Richtextbox - prevent flicker of richtextbox during reposition
Richtextbox - word wrap
Textbox - automatically highlight content
Textbox - select all text on focus
Textbox - undo (API)
Textbox - use Enter as TAB
Timer - extend control to large intervals
Toolbar - responding to button selection
Toolbar - responding to menu selection
TreeView - set background color
TreeView - traverse the tree

date-time

Time - elapsed time between 2 dates
Timer - milliseconds between 2 events

files binary

Determine if file is binary
Display only text conten of binary file
Open file with default Windows application
Read/write data to a specific location within the file
Read/write entire file at once
View in hex format

files text

Open text file with default text app
Open text file with Notepad
Read text file all at one time
Read text file into a string
Read text file into an array #1
Read text file into an array #2
Read text file one character at a time
Read text file one line at a time
Remove a character from a text file
Save array to file (fast)
View text file content
Wordwrap

files

Backup and Restore a file
Create full pathname
Delete file to recycle bin
Extract file name from full path
File exists
File properties (size/date/attributes)
FileSave
Get unique temporary file name
Is path a folder or file
Merge path and filename to get valid full path name
Move a file
Rename file list
Select File (dialog window)

flow control

Cycle through all controls on a form
Cycle thru 1 to n in a loop
Repeat code every N cycles
Use select case to evaluate multiple expressions

folders

Create a full folder path
Delete a folder and its subfolders
Drive exists
Folder exists
Get folder attributes
Get list of drive letters
Get type of drive
Open DOS window at folder
Open Window at folder
Open Windows Explorer at folder
Select folder (dialog window)

fonts

List all fonts

forms

Capture Enter key
Center a form
Create elliptical form
Disable form Close button
Keep form on top
Make a form cover the entire screen
Minimize all forms
Move form without using title bart
Put bitmaps in menus
Remove the border from a window
Set min/max size of form
Splitter, horizontal (form-based)
Splitter, horizontal (splitter bar)
Unload all forms
Unload event code

free controls and tools (non-commercial use)

Free programming tools

graphics

Convert between Long, RGB, VB, and Web colors
Draw text with a shadow
Get JPG/GIF/BMP/PNG image size
Get random color
Get screen resolution
Gradient - apply to a picturebox, 2 colors, 4 directions
Gradient - apply to form, 2 colors, 4 directions
Gradient - full spectrum
Non-centered wallpaper
Overlay an image
Read/write/display/convert GIF/JPG/BMP
Resize an image, keeping aspect ratio
Screen capture
Set wallpaper

internet

Check for Internet connection
Create URL shortcut
Create web page (HTML) from code
Download file from the web using API
Download web page (capture as string)
Get remote file information - size, date
Get stock prices
Open a web page in default browser
Send email using default app
Upload file (Freeware EZ-FTP)
Upload file (Internet Transfer Control)

math

Boolean comparison
Check for not null
Random integer within range
Round down
Round to 2 decimals
Round to n decimals
Round up
Swap two variables
Test for even
Test for non-zero
Test two variables for zero
Toggle between 0 and -1
Toggle between 0 and 1
Toggle between 1 and 2

misc-commands

Dial a Phone Number #1
Dial a Phone Number #2
Run code one time only within a subroutine
Show Onscreen Keyboard

multimedia

Play CD (MM control)
Play sound (API only)
Play sound (MM control)
Play video (MM control)
Record sound (MM control)

navigation

Find a single file - imageshlp.dll
List files and folders - API (pattern)
List files and folders - Dir$ (pattern)
List files and folders - FSO
List files and folders - SysFileControls

printing

Color printing
Print form image
Print images, positioned and scaled
Print preview
Print text, positioined, justified and size

registry

Clear application settings from registry
Edit registry key
Use registry to save program settings
Write registry value, any location using API

security

Checksum
Encrypt a file (no password)
Encrypt a file (uses password)
Encrypt a string (no password)
Encrypt a string (uses password)

sort

Bubble sort
Bubble sort (improved)
QuickSort
Using SHELL to DOS

strings

Compare leftmost character
Convert Byte array to string
Count occurences of string
Delete carriage returns from textbox
Eliminate duplicate character pairs in a string
Find text before/between/after two target strings
Find/replace
Get first word in a string
Split string into array
Using format$

system

Disable Ctrl-Alt-Del
Get computer name
Get handle of window from caption title
Get name of special folders
Get user name
Get Windows and System directories
Get Windows version
Hide the Window's taskbar
Hide/show taskbar or desktop
Open/close CD door
Reboot, restart or logoff system
Reboot, restart or logoff system (XP only)
Serial number of drive
Set environmental variables

0 Comments:

Post a Comment

<< Home