SP_KBDESC

KBDESC()

  Short:
  ------
  KBDESC() Keyboards character 27 (escape) when key pressed

  Returns:
  --------
  Nothing

  Syntax:
  -------
  SET KEY xxx TO KBDESC

  Description:
  ------------
  Allows setting an alternate key to the ESCAPE key.
  ESCAPE normally means 'get me outta here', but sometimes is the
  key you need to indicate the user is done selecting or some
  such. This function allows setting another key (e.g. F10) to act
  as the ESCAPE key.

  Examples:
  ---------
   SET KEY -9 TO KBDESC

  Warnings:
  ----------
  Be sure to issue a   SET KEY xxx TO   command to
  un-map this function when done

  Notes:
  -------
  Declare as EXTERNAL i.e.

  EXTERNAL KBDESC

  Source:
  -------
  S_KBDESC.PRG

 

Un-Touchable Window

#include "hmg.ch"
PROCEDURE Main()
   nWindWidth := 500
   nWindHeight := 400
 
   nUnMWinCol := ( GetDesktopWidth() - nWindWidth ) / 2
   nUnMWinRow := ( GetDesktopHeight() - nWindHeight ) / 2
 
   DEFINE WINDOW frmUnTouchable ;
      AT 0,0 ;
      WIDTH nWindWidth ;
      HEIGHT nWindHeight ;
      TITle "UnTouchable Window" ;
      MAIN 
 
      ON KEY ESCAPE ACTION thisWindow.Release 
 
      DEFINE TIMER Timer_1 INTERVAL 1000 ACTION DontTouchMyWindow()
 
   END WINDOW
   frmUnTouchable.CENTER
   ACTIVATE WINDOW frmUnTouchable
RETURN // UTW.Main()
*.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._
PROCEDURE DontTouchMyWindow()
   thisWindow.Row := nUnMWinRow 
   thisWindow.Col := nUnMWinCol 
   thisWindow.HEIGHT := nWindHeight
   thisWindow.WIDTH := nWindWidth
RETURN // DontTouchMyWindow()
*.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._.-._

Directory List

Reinvention of wheel ?

Not quite …

Main difference is allowing file(s) and folder(s) selection together.

Another difference is implementing of <lNoChangeDir> parameter. Unlike GetFile(), GetDIRList() uses this value  for allowing change directory ability to user.

Furthermore sorting grid columns by three (not two) ways, GetVolumLabel(), List2Arry() and Arry2List()  functions may be useful.

Also, test program ( TestGDL.prg ) may be a sample for .fmg based application.

Download here ( source only ).

Hex View

Hexadecimal file viewer.

This is a experimental project with first intend of point out the power of Harbour and HMG. So, HexView is considerably slow on large files, please be patient.

Download here ( source only ).

Message multiple values

MsgMulti ( aka MsM) is a message function accept multiple and any type of data.

Download here ( source only ).