Friday, June 29, 2007

From the Edge: Customizing Load Window Options for Compiled Applications
Section: Customizing R:BASE Compiled Application
Chapter: Running R:BASE Your Way!
Platform: R:BASE 7.6 and Turbo V-8 for Windows
Builds: R:BASE 7.6 (7.6.1.30622 or higher ...)
        R:BASE 7.6 (C/S:I) for Windows (Build: 7.6.1.30622 or higher)
        R:BASE V-8 Turbo (8.0.15.30622 or higher ...)

Let's assume that you have an application you wish to distribute as a
complied version and would like to customize the load window option to
be displayed while going through a few checks and connecting database
routines and so on.

Using the latest versions of R:BASE 7.6 for Windows, R:BASE 7.6 for
Windows (C/S:I) and Turbo V-8 for Windows, you have at least three
options to create a main application menu based on a form that is
related to a table, a variable form without a table and the external
form file.

Table-related forms and variable forms are only accessed after connecting
to the related database. However, the External Form Files are not related
to any database. Thus, you can design an application where you may CONNECT
and DISCONNECT any database and do all routine checks in your application
based on External Form Files. This is a totally portable approach to design
your application main menu without being associated with any database.

To compile an application based on a database form, use the following steps:

01. Define a startup file, such as Startup.DAT to compile.

    Example:

    -- Startup.DAT (For Database Form Driven Menus)
    PROPERTY LOADWINDOW TITLE 'Loading - Please Wait ...'
    PROPERTY LOADWINDOW PROGRESS 50
    CONNECT dbname IDENTIFIED BY owner password
    EDIT USING ApplicationMenu
    RETURN

02. Use the following code as On Before Start EEP for the application main
    menu form:

    -- On Before Start EEP
    PROPERTY APPLICATION TITLE 'Application Title Here ...'
    RETURN

03. Use the following code as On After Start EEP for the application main
    menu form:

    -- On After Start EEP
    CLEAR VARIABLE vCompiled
    SET VAR vCompiled TEXT = NULL
    GETPROPERTY APPLICATION ISCOMPILED vCompiled
    IF vCompiled = 'YES' THEN
       PROPERTY LOADWINDOW CLOSE 'TRUE'
    ENDIF
    CLEAR VARIABLE vCompiled
    RETURN

04. Using R:Compiler 7.6 or R:Compiler 8.0, compile the Startup.DAT.
    Use appropriate file name for the compiled executable file name
    (.exe) and make sure to check the option for Show Loading Window
    as illustrated in figure 1.

To compile an application based on external form file, use the
following steps:

01. Define a startup file, such as Startup.DAT to compile

    Example:

    -- Startup.DAT (For External Form File Menus)
    PROPERTY LOADWINDOW TITLE 'Loading - Please Wait ...'
    PROPERTY LOADWINDOW PROGRESS 50
    REFF ExternalFileFormName.rff
    RETURN

02. Use the following code as On Before Start EEP for the application
    main menu form (External Form File):

    -- On Before Start EEP
    PROPERTY APPLICATION TITLE 'Application Title Here ...'
    RETURN

03. Use the following code as On After Start EEP for the application
    main menu form:

    -- On After Start EEP
    CLEAR VARIABLE vCompiled
    SET VAR vCompiled TEXT = NULL
    GETPROPERTY APPLICATION ISCOMPILED vCompiled
    IF vCompiled = 'YES' THEN
       PROPERTY LOADWINDOW CLOSE 'TRUE'
    ENDIF
    CLEAR VARIABLE vCompiled
    RETURN

04. Using R:Compiler 7.6 or R:Compiler 8.0, compile the Startup.DAT.
    Use appropriate file name for the compiled executable file name
    (.exe) and make sure to check the option for Show Loading Window
    as illustrated in figure 1.

A PDF version of this article is also available at:

From The Edge: http://www.razzak.com/fte/

Very Best R:egards,

Razzak.

--- RBASE-L
================================================
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]

(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE: Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body, place any text to search for.
================================================

Reply via email to