Home Page For GFAWHELP The Very Best
In Basics

GB32 CUTnPASTE Code Snippets

Cut and Paste

These are cut and paste code examples. 
1. If no form data is in the example just paste into the GB32 editor and Run
2. If Form data is present paste into a text editor and then save as FILENAME.G32. 
3. Load FILENAME.G32 into GB32 Editor
The Form data will then be present in The Editor.
The Back Button Will Return you to the Menu Area
AB C D E F G H I J K L M N O  P Q R S T U V W X Y Z 

GFA Basic 32 Cut And Paste Code Snippets
( A) Cut And Paste Code Snippets
Add Hardware Displaying The AddNewHardware Dialog.
Add Picture at Run Displaying a Image At RunTime
Add To Documents Adding Documents To The Documents Folder
App Path Getting Applictions Path
AutoRedraw Using AutoRedraw In A Application
Array Init Checking If An Array Is Initialized

( B) Cut And Paste Code Snippets
Bold Fonts Bold Fonts On A Command Button
( C) Cut And Paste Code Snippets
Caps Lock Key Toggleing The Caps Lock Key ON/OFF
Caret Flash Speed Displaying The Caret Flash Speed..
Caret Show Hide HIding and Showing The Caret
ComboBox Add Item Add a Item To A Combo Box
CD Drive Getting The CD Drive Letter
CD Folder Check Checking A CD Drive For A Folderr
Chain Chaining a Program
Caption Color Changing The Caption Bar Color
Change Case Changing Text Case In A Text Box
ChangeForm Changing A Forms Back Color
Change Label Changing A Labels Color
Characters Displaying Characters 0-255
Choose The Choose Command
Clip Cursor Restricting Cursor Area
Color Depth Displaying Color Depth
ComboBox Add Adding A Item To A Combo Box
ComboBox Index ComboBox Item Index Numbers : by Barbosa
ComboBox Copy Copies All Text From A TextBox To A ComboBox
ComboBox Copy Selected Copies Only The Item Selected In Combo1 To Combo2
ComboBox Repopulate Clear A ComboBox And Repopulate The ComboBox
ComboCombo Copy Copies All Text From A ComboBox To A ComboBox
ComboCombo Copy/Delete Copies All Text From A ComboBox To A ComboBox And Deletes Combo1 Items
Combo Drop Down Have a ComboBox Open When Program Is Executed
Combo RemoveItem Remove Some Items From A ComboBox
Combo Resort Resorting ComboBox Items / Ascending - Descending
Combo Searching Searching A ComboBox With SendMessage API
Combo Searching Searching A ComboBox With GB32 code- Thanks to Antonio Barbosa
Combo Save Save ComboBox Entries
Combo Text Limiting ComboBox Text Length
ComboBox Fonts Display Available Fonts In A Combo Box
ComboBox Width ComboBox Width: Changing In Your Program
Command Caption Changing A Commands Caption
Common File Select Using The Common FileSelect Dialog
Configure Printer Using The Common FileSelect Dialog
Convert Bytes To MB Converting Bytes To MB
Convert Bytes To MBGB Converting Bytes To MBGB
Copy Move Files Copy and Move Files Of Type Or All(*.*)
Create Picture Create Picture Example
Changeing Mouse Pointer Using a Cursor (.cur) as Mouse Pointer
Current Time Displaying The Current Time
( D) Cut And Paste Code Snippets
DeskTop Refresh Refreshing The DeskTop
Default Printer Getting The Default Printer
Directory Check Checking If A Directory Exists
Disable Button Disable A Command Button
Display Fonts Display All System Fonts
DoEvents Using The DoEvents Command
Draw Animated Rect Draw A Animated Rectangle
Drive Serial# Diplaying A Drive Or CDs Serial Number
Drive Type Diplaying Type Of Drive Or CD
( E) Cut And Paste Code Snippets
Enviroment Display All ENV Variables
Enum Printers Determine Which Printers Are Connected
Extract Icon Extract Icon From A .Exe
( F) Cut And Paste Code Snippets
File Date Getting A files DateAnd Time
File Date2 Getting A files DateAnd Time: Second Example
File Status Is The File Read Only?
File Type Displaying Files Of One Type
Find All Displaying The Find All Files Dialog
Font Exist Checking If A Font Exist on A System
Fonts All Displaying All The Fonts on A System
Font Count Displaying All The Fonts With Numerical Count
Form BkColor Changing A Forms Back Color
Form Big Font Displaying Big Fonts On A Form
Form Caption Making A Form Caption Flash
Form Checkered Making A Checkered Form Background
Form Icons Drawing Icons On a Form
Form Text Highlighting All Text
Form DiskText Display A .Txt File From Disk On A Form
Form Fill5 Filling A Form 5 Different Ways
Form Lines Drawing Lines On A Form ; Sunken and Raised
Form Shapes Shaping A Form With POINTAPI : Many Possibilities.
Form Tile Tiling A Picture On A Form
Form Wipe Wiping A Form When Done
Free BItmap Free Bitmap From Memory
Free Space Display The Free Space On A Drive
(G) Cut And Paste Code Snippets
GeDevCaps GetDevCaps:Current Screen:Horizontal and Verticle Resolution
GetDisplayColors Display Number Of Colors Available
Get Click Time Get The Double Click Time For The Mouse
Get Serial Get A Drives Serial Number
Get Directory Get The System Directory
Get Systime Get The System Time
GetUserName Get The Users Name
Get TickCount Get The Tick Count For Your Computer
Global Memory Global Memory Status
( H) Cut And Paste Code Snippets
Calling ..HLP Calling A Programs Winhelp Help File
( I) Cut And Paste Code Snippets
Icon In About Dlg Display Any Icon InThe MS About Dialog
Icon Status Copying a Image
Image Copy Copying a Image
Image Stretch Stretching A Image
InputBox Using A INPUTBOX
IsNumeric Check If A String Is All Numeric Data
( J) Cut And Paste Code Snippets
NO J Data Waiting On J Data
( K ) Cut And Paste Code Snippets
NO K Data Waiting On K Data
( L ) Cut And Paste Code Snippets
Label Color A Colored Label
Label Click Change A Labels caption With Mouse Right Click
Label URL A Selectable URL In A Label
List Box Adding files To A List Box
List Box Disk Populating A List Box Disk Text File
List Box Copy Copying Data From A List Box To Another List Box
List Box Columns Usings Tabs To Make a Multicolumn List Box
List Box Copy Copying Data From A List Box To Another List Box And A Combobox
List Box Copy Copying Data From A List Box To Another List Box Without SendMessage
LB Selected Copying Selected Items A List Box To Another List Box Without SendMessage
List Box Deleteing List Box Items
List Box Multiple Deletions Selecting And Deleting Multiple Items In A ListBox
List Box Multiple Select Selecting Multiple Items In A ListBox
List BoxM A List Box With A Calendar
List Box Font Changing A List Box Font
List Box Font Changing A List Box Font- Example #2
ListBox Mousesover Displaying ListBox Text In A TextBox With Mouseover
LB_ADDSTRING Using LB_ADDSTRING To Copy From TextBox To ListBox
LB_FINDSTRING Using LB_FINDSTRING From A To TextBox To Hilite Same Name In A ListBox
LB_ITEMFROMPOINT Using LB_ITEMFROM POINT Shows Index Number Of ListBox Item And ToolTip For each Item
List Box Tips List Box Tool Tips
ListViewOcx ListView using OCX
ListViewData ListView Population With Data
ListView ListView using Forms
ListView ListView using Forms: More Elaborate Example
ListView2 ListView using Forms: More Elaborate Example by Antonio Barbosa
ListViewGridLines Inserting or Removing Grid Lnes In A ListView
ListViewDeleteSelected Delete Selected Item From A ListView
ListView Disk Data ListView Population From Disk
ListView Disk Save Saving ListView Data To A Disk File : Also Load From Disk :Revised 05/25/2001
ListView DiskSort Loads ListView Data from Disk And Sorts On any Of 3 Columns
ListViewSort ListView With Sorting by hinz.kunz@freenet.de
Load Dll Loading A .DLL Library
Load Icon Loading A New Mouse Icon
Load Pic Loading A Picture
Load File Loading Text Into A Text Box
Load File#2 Loading A Text File Into A String
Load Combo Loading A Text File Into A ComboBox
LockWindow LockWindowUpdate Command
Limit Runs Limit How Many Times Your Program Can Be Run
( M ) Cut And Paste Code Snippets
MBApp Path Message Box Showing Appliction Path
MB Pixels Message Box Showing Current Screen Pixels
ME Back Color ME Back Colors
Modem Display Modem Properties
Monitor Monitor : On -Off - Standby
Mouse Display How Many Mouse Buttons
Mouse Exist Checking For The presence Of A Mouse
Mouse Properties Display The Mouse Properties Dialog
MouseXY Display The Mouse XY Position
Move LB Text Moving Text From A List Box
MS About Displaying The ®MIcrosoft About Dialog
MS Spell Using The Spell Checker In ®MS Word
MultiMedia Display The MultiMedia Properties Dialog
( N ) Cut And Paste Code Snippets
Network Checking If A Network Is Installed
Next Drive Show Next Available Drive
Number To K Convert A Number To KBytes
( O ) Cut And Paste Code Snippets
Open With Display The Open With Dialog
( P ) Cut And Paste Code Snippets
PassWord Display Password Dialog
PBOX Using The PBOX Command
Picture Save Saving A Windows Meta File As A Bitmap
Play Midi Playing And Stopping A Midi File
Printer Fonts Display Available Printer Fonts In A Combo Box
Printer Installed Checking To See If A Printer Is Installed
Print Forms Printing On a Form
( Q ) Cut And Paste Code Snippets
QSort Data Using Qsort To Sort An Array
( R ) Cut And Paste Code Snippets
Rainbow Text Display A Form With Rainbow Text
RandomShuffle A Random Shuffle Routine
Reading Data Reading From Data Statements
Read Text Reading A Text File From Disk Into A Text Box
Regonal Settings Displaying The Regional Settings Dialog
Remove Chars Removing Characters From A String
Remove Spaces Removing Spaces From A String
Remove Dir Removing A Directory
ReName Renaming A File To A Different Name
Rich Text Box Changing The font In A RichText Box
Rich Text Load/Save Loading and Saving A RichTextBox Contents
Rich Text Box Bold Changing The Text In A RichTextBox To Bold/Underlines
Round Corners Making A Form With Rounded Corners
( S ) Cut And Paste Code Snippets
Screen Res Display The Resolution Of The Screen
SendMessage ~SendMessage(Me.hWnd, WM_SYSCOMMAND, SC_CONTEXTHELP, 0)
Set KeyBoard Set KeyBoard State -Toggle CAPS LOCK Key
Set Window Text Set The Text In a Windows Caption
Shade Form Shading a Forms BackGround
Shell Execute Using ShellExecute to Display A Web Site
Shell And Wait Shell And Wait For Return
Show Files Show All Files Of One Type- Ex- .g32/.DLL/.exe
Show Run Show The Run Program Dialog
Show Type Show All Files Of One Type(.LG32)
Sound Prop Display The Sound Properties Dialog
Start Program Starting Another Program With GB32
Status Bar Demo Status bar demo by Antonio Barbosa
System Display The System Version
System Resources Display The Systems Resources
( T ) Cut And Paste Code Snippets
TextBox Add Lines Adding More Data Entries To A Text Box
TextBox BkColor Changing A TextBox BackGround Color When Test Box Is Selected
TextBox Lines Counting The Lines In A TextBox
TextBox Save Saving The Contents Of A TextBox
Text File Reading A text File form Disk
Text On Form Putting Text On A Form
Text Box Scroll Putting Text On A Form
Time Label Displaying The Time On A Label
Time Displaying The Time To A MiliSecond
Toggle Button Toggleing A Button
ToolBar Demo ToolBar Demo by ANtonio Barbosa : Good One
Total Memory Total Memory Available
Treeview1 TreeView Demo by ANtonio Barbosa
Trim Command Trims Spaces From Either or Both Ends Of A String
( U ) Cut And Paste Code Snippets
Url Download Downloading A File From A URL
( V ) Cut And Paste Code Snippets
Validate Address Checking An Email Address To See If It Is A Valid Address
( W ) Cut And Paste Code Snippets
Wallpaper Changing The Windows WallPaper
WMMessages Some Common Windows Messages
Windows Info Windows System Information
Windows Mode Determine Which Mode Windows Is Running In
Windows Network Displaying The Windows Network Dialog
With Using The With Command
WinVer Finding Your Version Of Windows
Word With Doc Open .DOC File In MSWord®
( X ) Cut And Paste Code Snippets
X Data No X Data At Present
( Y ) Cut And Paste Code Snippets
Y Data No Y Data At Present
( Z ) Cut And Paste Code Snippets
ZeroPad Pad A Numerical Value With Leading Zeros
ZTRIM Removing Chr$(0) From a String

Caret Flash Speed

Add New Hardware Dialog

Add Picture At Run

Add Remove Programs

APP Path


ComboBox AddItem

CD Drive Letter

Change Caption Color

Change Case TextBox

Change Form Back Color

Change Form Label Color

Characters 0-255


Combo AddItem

ComboBox Fonts

Command Caption

Common File Select Dialog

Configure Printer Port

Convert Bytes to MB

Convert Bytes to MBGB

Cony/Move File

Coursor As Mouse Pointer

Current Time

Default Printer

Disable Command Button

Display All Fonts

Do Events

Draw Animated Rect

Enumerate Printers

Extract Icons

Date and Time of File

Files Of Type

Find All Dialog

Font Exist

Installed Fonts

Form Back Color

Form Big Fonts

Checkered Form

Highlite All Text

Disk Free Space


Get Serial Number

Get System Directory

Get System Time

Get TickCount

Global Memory Status

Copy Image

Image Stretch

ListBox Add Files

ListBox Add Items

ListBox Font Change

ListBox Font Change

ListBox Tool Tips

Loading A .Dll

Loading A New Mouse Icon

Loading A Picture

Load File To A Text Box

Load File Into A String

Load File to ComboBox


Mail Applications Installed

Message Box APP Path

Message Box File Length

Get Screen Pixels

Form Back Color

Modem Properties

Mouse Buttons

Mouse Exist


Mouse Coordinates

Move ListBox Text

MIcrosoft About Dialog

Microsoft Spell Check With Word

Multi Media Properties

Is Network Installed

Next Available Drive

Number to K

Open With Dialog

Password Dialog Properties

PBOX Command

Play/Stop Midi File

ComboBox Printer Fonts

Printing On A Form

Rainbow Text

Random Shuffle

Reading Data

Read Text File To a Textbox

Regional Settings Dialog

Remove Characters From String

Remove All Spaces In A String

Remove Directory

Rename File

Rich TextBox Font Change

Ronded Corners On a Form

Run Program So Many Times

Screen Resolution

Set Keyboard State

Set Window Text

Shade Form


Show All Files Of Type(.dll)

Show The Run Dialog

Show Type Of File

Sound Properties Dialog

Show APP Version

Text File From Disk

Text On A Form

Time On A Label

Time To A Milisecond

Toggle Button

Total Memory Available

URL Download File

Validate Email Address

Windows System Information

Windows Network Dialog

With Command

Text Box Scrolling

Bold Commmand Fonts

Icon In Status Bar

Copy ComboBox Text

Any Icon In A About Dialog

Change Windows Wall Paper

MS Word With .Doc File Loaded

Font Count

Trim Spaces

ZTrim Chr$(0)

Disk Text File On Form

Count Lines In A TextBox


Calling Program Help

List Box Calander

Windows Version

Starting Another Program

Create Picture

File Date aand Time Ex.#2

Free Memory

GetDevCaps :HV Res

SendMessage Example

Drive Or CD Serial Number

Using LB_ADDSTRING To Add Text

Get The Users Name

A Selectable URL In A Label


Wiping A Form When Done

Display The Number Of Colors Available

Are Characters Numeric?

Shaping Forms

List Box Deletions

Copy Listbox To Another Listbox

MOnitor - Off -On - Standby

Check For Directory

ListBox Multiple Selections

Windows Mode

Tiling A Picture

Drivev Type

Fill a Form 5 Ways

Saving A WMF File

Display System Resources

A Colored Label

Copy Selected Items From a ListBox

Copy ListBox Without Using SendMessage

Copy Selected Items From a ListBox

Is a File Read Only

Checking If A Array Is Initialized

Zero Pad a Number

Multiple Deletions

Copy Combo To Combo

Deletes Old ComboBox On Copy

Clear A ComboBox and Repopulate

Remove Some Items From A ComboBox

Check For A Directory On A CD

Change Back Color Of Text Box When Selected

Sortng a ComboBox

Open ComboBox on Execution

ComboBox Width : Changing


ListView With Forms

More elaborate LisView

ListView Example: Nice

ListView With Sort

Useing A InputBox

Flashing A Forms Caption

Populating ListView From Data

Printer Installed

Populating A ListView From Disk

ListView Disk Data Sorted

TreeView Demo by Barbosa

Change Label Caption With A Right MOuse Click

Making Selected Text Bold

Populate ListBox From Disk

Copies Only Item Selected

Some Common Windows Messages

Copying List to Text With Mouseover

Chaining A Program

Save Contents Of A TextBox

Adding Entries To A TextBox

Refresh DeskTop

The Choose Command

Grid Lines In A ListView

Drawing Icons On A Form

Status Bar and Tool Bar Demo

Drawing Lines On A Form

COmbo Index Numbers

All ENV Variables

Multi Column List Box

Limit Combo Text Length

Save ComboBox Contents

Easy RTF Population

Saving ListView Data To Disk

Sort An Arraay With Qsort

Delete Selected Item

Shell And Wait

Restricting Cursor Area

Searching A combo Box With SendMessaage

Searching Combo With GB32 Code