General information
Category:
Coding, syntax & commands
Here's the code in my startup program.
SET PROCEDURE TO udflib.prg
SET ESCAPE OFF
SET TYPEAHEAD TO 0
gc_prg='TIMESHEET' &&V RJH 04/04/96: Used in error handler
gn_msgok=0
gn_msgf=0
gn_msgokcan=1
gn_msgquery=32
gn_msgwarn=48
gn_msgvok=1
gc_custid=''
gc_quote=''
gc_quoteid=''
gc_contact=''
gc_activid=''
gc_tickid=''
gc_employ=''
gc_goscr=''
gc_lastmenu=''
gc_lastscr=''
gc_mainpath=''
gc_syspath=''
gc_datapath=''
gc_userpath=''
gc_progpath=''
gc_formpath=''
gc_menupath=''
gc_oldpath=SYS(5)+SYS(2003)
gc_userid=' '
gc_alias=''
gc_order=''
gc_salias=''
gc_flds=''
gc_fcls=''
gc_title=''
gl_cancel=.F.
gl_endapp=.F.
gn_scrn=1
gl_addflag=.F.
gl_admin=.F.
gl_inactive=.F.
gl_dead=.F.
gl_lockout=.F.
gl_maint=.F.
gl_process=.F.
gl_employ=.F.
gl_delete=.F.
gl_add=.F.
gl_systemid=''
DO setenv
ON ERROR DO errhand.prg WITH ERROR(),MESSAGE(),MESSAGE(1),PROGRAM(),LINENO()
=openfiles("syspath")
ON ERROR
WAIT CLEAR
SELECT syspath
SET ORDER TO name
SEEK "MAINPATH"
gc_mainpath=ALLTRIM(DATA)
SEEK "DATAPATH"
gc_datapath=alltrim(data)
SET DEFAULT TO ALLTRIM(DATA)
SEEK "SYSPATH"
gc_syspath=ALLTRIM(DATA)
SEEK "PROGPATH"
gc_progpath=ALLTRIM(DATA)
SEEK "FORMPATH"
gc_formpath=ALLTRIM(DATA)
SEEK "MENUPATH"
gc_menupath=ALLTRIM(DATA)
gc_lastscr=gc_progpath+'mmenu'
gc_lastmenu=gc_progpath+'mmenu'
SET COLOR OF SCHEME 1 TO RGB(192,192,192,192,192,192)
gc_mainpath+'twruff.ico' FILL FILE gc_mainpath+'mpback.bmp'
MODIFY WINDOW SCREEN NOCLOSE TITLE gc_appname
CLEAR
SET COLOR OF SCHEME 1 TO RGB(0,0,0,255,255,255),RGB(0,0,0,255,255,255),,,,RGB(255,255,255,0,0,191),,,,RGB(0,0,0,192,192,192)
SET MESSAGE TO gc_appname
=RAND(-1)
WAIT WINDOW "Opening Files..." NOWAIT
* DO opendata
WAIT CLEAR
*****
DO WHILE NOT gl_endapp
IF EMPTY(gc_goscr)
DO (gc_lastmenu)
READ EVENTS
ELSE
DO (gc_goscr)
READ EVENTS
ENDIF
ENDDO
*****
DO logout
DO clsproc
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only