* Harbour Example lists the volume serial numbers * and volum labels of all drives in the system ( PC ) * * Build : * * c:\harbour\bin\hbmk2 VolInfo -lhbct -lxhb -run * PROCEDURE Main() LOCAL nDrive, cDrive, nSerial, cSerial SetMode( 25, 80 ) CLS SETPOS( 5, 0 ) FOR nDrive := 1 TO 26 cDrive := CHR( 64 + nDrive ) + ":\" nSerial := VolSerial( cDrive ) IF nSerial # -1 cSerial := NTOC( nSerial, 16 ) ? cDrive, STUFF( cSerial, 5, 0, ":" ) + " " + GetVolInfo( cDrive ) ENDIF NEXT @ MAXROW(), 0 WAIT "EOF VolInfo.prg" RETURN
Monthly Archives: March 2013
Faster Migration
Quick Start to Migration
Chapter I – Text to text conversion
Section 2 – Faster Migration
Well …
Forget about all those mysterious DOS / console / command modes, batch processing, etc.
If you have tongs, don’t burn your hand!
Yes we have; so let’s use it:
Step : 1
Begin with making / assigning a folder for your works; FE : C:\MyWorks
Note : Working in a separate and clean folder is important.
Step : 2
Build a “Harbour Project” file : say MyTest01.hbp; and put a line into it :
My1stProg.prg
Step : 3
Build a a program file : say My1stProg.prg ; and write your very first program:
REQUEST HB_GT_WIN_DEFAULT
PROCEDURE Main
SETMODE( 25, 80 )
CLIENTE = SPACE( 15 )
@ 10, 15 SAY "Customer : " GET CLIENTE
READ
@ 12, 0
? CLIENTE
WAIT
RETURN
Step : 4
Open your .hbp file with HMG-IDE and press “Run” button.
That’s all !
Any other problem / question ?
Happy HMG’ing 😀