                        dBsee Technical Support FAX

7/1/95

Frequently Asked Questions - dBsee 4.1

Q.   How can I change the keys that activate adding/modifying and
     deleting from the default INSERT , SPACEBAR and DELETE keys?

A.   You have to modify the menu label's "Hot-Key". This is done going
     into the ENTITY environment and hi-liting the target object.  You then
     press the menu button and hi-lite the menu label you want to change.
     Pressing  the space bar brings up the definition window for that
     label.  Select the KEY button and you will be asked to press the key
     you want to use to activate that label's function.  For example: use
     the Control-Enter key to add records, the Enter key to modify records.

Q.   Is it possible to bring up a "Search on Keys" form (F7) from a
     browse object, called by a pushbutton or a menu label ?

A.   Yes, use the function tbKey(oWin) to activate the key module from
     a Browse object, a window object or a listbox. This must be inserted
     into the menu in browse objects.

Q.   Is it possible to make a form called from a menu label come up in
     "modify mode" ?

A.   Yes, by calling the function with the parameter DE_STATE_MOD :
     Ex: CustFrmExe( DE_STATE_MOD ) note that it must be in capital letters.

Q.   Is it possible to clear the screen before the application runs
     without using one of the standard  background screens but using for
     example a black screen or other colors ?

A.   Yes, by setting the foreground, background and shadow colors of
     the SCREEN COLOR to the same colors. This is accessed using the
     pushbutton PROPERTIES under the PROJECTS environment.


Q.   I need to imput a lot of records at a time in both browse form and
     page forms. I don't want to have to use insert and then F10 each time,
     also I want to carry the contents of the previous fields forward into
     a new record.

A.   The SAVE AND APPEND (F9 KEY) modality works automatically only in edit
     form objects. To use it in other form objects you have to insert your
     own code in the injection point GET0 at the bottom of the function GET
     :   (injection points can be accessed within dBsee or the source code-
     see manual)
     ...

     IF ACT == "new"        // F9 key
        dbAct2Kbd( "add" )  // keyboard of the new insert
     ENDIF
     ...

     If you want to also carry field contents forward into a new record you
     have to proceed in this way:
     For example if you want to design it for the object ArtFrm.
     In dBsee define a new menu label for this functionality, activated by
     the key Alt+F3 ( "A03" is the its logical action ) . Define the
     following in the option "KEY FUNCTION" of the label : (accessed by
     pressing CTRL-Enter with the menu label hi-lited)

          ArtFrmExe( DE_STATE_MOD )

     In the injection point GET2 ( After evaluation variables ), insert
     this code :

     IF Act == "A03"                    // special key for quick insert
             cState := DE_STATE_ADD     // set insert mode
     ENDIF

     Then , insert a new code  in the injection point GET0 at the bottom of
     the function GET :

     ...

     IF ACT == "new"        // F9 key
        dbAct2Kbd( "A03" )  // keyboard of the fast insert
     ENDIF

     ...

     In this way the object reads data from the current record, not from
     the end of file.


Q : I want to use the search (F7) function with a form that is composed only
    of a list box. The list box operates on the same file as the form.
    How can I proceed ?

A:  If you want to apply the search key function to a List Box, you have
    to modify the function <FILE>->(ddKey()) associated with the SEARCH ON
    KEY label (KEY FUNCTION OPTION ) of the main menu with the function
    tbKey( <LISTBOX CONTROL_ID> ).

    So if you have a form that contains only a list box and it's
    CONTROL IDENTIFIER is lsb0001 and it operates on a file named CUST, you
    have to replace the function

    Cust->( ddKey() )
    with the function
    tbKey( lsb0001 )

    in the option KEY FUNCTION of the "Search On Key" label.

Q. How to utilize 50-row Video Mode (screen up to 132 x 60) in dBsee
   Applications with character redefinition ?

A. You can proceed in two different ways :

   1. In the dbstart.ini of the project modify the line:
      ConsoleLines=
      to
      ConsoleLines= 50

   2. Or set this mode from DOS before you run the application.

Q. Which graphic formats does the function dLoadRaw() support? Is the
   RAW format graphics-standard ? How can I convert images in other
   formats into the RAW format ?

A. You can use the shareware software Alchemy to transform an image
   into a RAW format.
   The right size of the RAW image that you can display with the
   function dfLoadRaw() is 320x200x256.
   (There is also a utility, PCX2RAW.ZIP, on the Tech Support BBS which
    will convert an appropriately sized PCX file to RAW format)

Q. How can I make a lookup window to open on a field before entering any
   data ?

A. The best way to do it, is to keyboard the action "win" (f7), in the
   FORM_PREGET of the control function.
   Suppose you want to include this feature for the control CodArt, you can
   proceed in this way :

   STATIC FUNCTION CodArt( ....

   ... standard code

   CASE nPrePost == FORM_PREGET

        * #COD IIEDTB0027
        IF !empty( CodArt )
           dbAct2Kbd( "win" )   // keyboard of F7
        ENDIF
        * #END

        * #COD IIEDTA0027 * #END
   ... standard code


Q. How can I create a new injection point ?

A. To create a new injection point you have to modify the template !

   So suppose we want introduce our code where is no injection point :

   *******************************************************************************
   FUNCTION b010Exe(                                  ; // [ 01 ]  EXECUTOR OF OPERATIONS
                        cMode                        ,; // Operating mode object
                        nTbOrd                       ,; // Index
                        bTbKey                       ,; // Key
                        bTbFlt                       ,; // Filter
                        bTbBrk                       ,; // Break
                        cClose                       ,; // Close object mode
                        arrInh                        ) // Array of fields inherited
   *******************************************************************************
   STATIC nWin    := 0                                  // Flag to avoid recursivity of the object

   LOCAL  lRet    := .F.                                // Logical returned flag

   * #COD OBEXE0 * #END //  Execute base operation to activate FORM object

   DEFAULT cMode  TO DE_STATE_INK                       // Complete operating mode
   DEFAULT cClose TO W_OC_RESTORE                       // Closing mode  Restore
   DEFAULT arrInh TO {}                                 // Array of inherited fields


   PRIVATE  EnvId:="b010" ,SubId:=""                    //Help ID'

   /* WE WANT INTRODUCE HERE OUR CODE !!!!!!!!!!!!
         <-----------
   */


   nWin++
   IF nWin==1
   .........

   What we have to do is modify the template that generates this source ( in
   this case the file form.tmp ) , introducing a line with the template
   command .inj that creates a new injection point !
   .inj <inj Id.> <description>
        where:
        <inj Id.>     = Injection point identificator, a string of 4 characters.
        <description> = A character description of the injection point

   So we can imagine something like this:
   (Form.tmp)
   *******************************************************************************
   FUNCTION  cTprg Exe(                ; // [ 01 ]  EXECUTOR OF OPERATIONS
                        cMode         ,; // Operating mode object
                        nTbOrd        ,; // Index
                        bTbKey        ,; // Key
                        bTbFlt        ,; // Filter
                        bTbBrk        ,; // Break
                        cClose        ,; // Close object mode
                        arrInh         ) // Array of fields inherited
   *******************************************************************************
   STATIC nWin    := 0                   // Flag to avoid recursivity of the object

   LOCAL  lRet    := .F.                 // Logical returned flag

   .block exe0 Execute base operation to activate FORM object

   DEFAULT cMode  TO DE_STATE_INK        // Complete operating mode
   DEFAULT cClose TO W_OC_RESTORE        // Closing mode  Restore
   DEFAULT arrInh TO {}                  // Array of inherited fields


   PRIVATE  EnvId:=" cTprg " ,SubId:=""     //Help ID'

   .if TisInitProc()
   .do InitProc
   .endif

   .inj new1 my new injection point!

   nWin++
   IF nWin==1
   .......

   When you regenerate your code you will obtain :


   .......
   STATIC nWin    := 0                                  // Flag to avoid recursivity of the object

   LOCAL  lRet    := .F.                                // Logical returned flag

   * #COD OBEXE0 * #END //  Execute base operation to activate FORM object

   DEFAULT cMode  TO DE_STATE_INK                       // Complete operating mode
   DEFAULT cClose TO W_OC_RESTORE                       // Closing mode  Restore
   DEFAULT arrInh TO {}                                 // Array of inherited fields

   PRIVATE  EnvId:="b010" ,SubId:=""                    //Help ID'

   * #COD OINEW1 * #END my new injection point!

   nWin++
   IF nWin==1

      aInh   := arrInh                                  // Reassign inherited fields array
      cState := cMode                                   // Reassign operating mode state
   .......


Q. How do I use passwords in dBsee ?

A. Passwords are encrypted and stored in the dblogin.dbf.

   Here's how it works.  Passwords are automatically assigned a User Level, for
   example, the default passwords stored in the dblogin are ISA001 - ISA099.
   This gives 99 different passwords and userlevels.  ISA001 = userlevel 1,
   ISA002 = userlevel 2 and so forth up to userlevel 99.

   To utilize the password system simply go into the subprojects properties and
   set Password system to YES.  You can then limit access to menus based on
   the userlevel.  To do this select a menu label and open it's defintion
   window.  In the ACTIVATE IF selection insert the function to test the
   user level.

   Example  dfSet( AI_USERLEVEL ) > 3  (Must evaluate to .t. to activate)

   The AI_USERLEVEL references the current userlevel and must be all caps.

   Any password in the system may be changed using the function dfCngPwd().
   This function can be called from a menu label or a pushbutton and will ask
   for the password to be changed and then for the new password and optionally
   the users name.

   There are other functions listed under the Inkey section of the Norton
   Guide which will help manage the password system.

   My thanks to Joe Robbins of DSET for pointing out the vague docs in this
   area.

==============================================================================
 We will continue to post an updated FAQ file on the dBsee BBS (410-535-3373).


 End of FAQ
