Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Application Distribution
Message
From
30/01/2004 10:59:26
 
 
To
30/01/2004 10:57:59
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00871919
Message ID:
00872346
Views:
18
Here it is in it's entirity:

*********************
*** Program: UlasMain.Prg
*** Main Program for Unit Level Access System
**********************
SET SYSMENU OFF
SET MULTILOCKS ON

** CLEAR ALL PREVIOUS ACTIVITIES **
RELEASE ALL
RELEASE MENU
RELEASE POPUPS
RELEASE WINDOWS
CLEAR
DEACTIVATE WINDOW "Project Manager"

_SCREEN.WINDOWSTATE = 2
_screen.closable = .F.
_screen.caption = 'ULAS Version 1.0b'

close databases all

* declare public varables for objects to be created below
public oPro, oVar

* Defines array that is not created and causes the project manager to issue error --
* External command keeps that from happening
* set Talk status
Local m.cOldTalk
m.cOldTalk = (set("Talk") = "ON")
set Talk off

* Define Window for ShutDown Message (Activated ONLY in DownShut.prg)
* This window must have "ShutDown" as it's title, Case Sensitive!
Define Window UlasShut ;
At 1,1 Size 10,61 ;
Font "Arial",16 Style "B" ;
Title "ShutDown" ;
Panel NoFloat NoGrow ;
Color w+/r

* Set Paths
Store sys(5) to drvid1 && drive ID from executing program (you ran it from program group)
Store curdir() to thisdir1 && current directory from execution program

gcDataPath = ADDBS(gcAppPath+"Data\")
gcOldDataPath = SET("PATH")
SET PATH TO gcAppPath+;"GCdATApATH+";"+GCoLDpATH

**set path to &drvid1.&thisdir1

SET CLASSLIB TO TARAfrm.VCX
SET CLASSLIB TO ULAS.VCX ADDITIVE

******************************* End Production Settings Section *******************************

* Set status bar
Set Status Bar Off

* Create application object to contain application methods
oPro = createobject("PRO")

* Create object to contain application wide properties
oVar = createobject("VAR")

* Set Main Screen - application title, font for wait window positioning
Modify Window Screen Title "Unit Level Access System, Version 1.0b" Font "Arial",10 Style "B"

On Error oPro.Erhandler(Error(), Message(), Message(1), LineNo(), Sys(16), LastKey(), Alias(), Sys(5), Sys(2003))

* Setup ShutDown routine for external interrupt
On Shutdown Do Downshut

* Setup running environment and key assignments
oPro.DoSets()

SET CENTURY on
SET TALK OFF
SET ECHO OFF

oVar.SysDataPath = ALLTRIM(gcDataPath)

* Application menu
do form login.scx
Read Events

IF oVar.LoginOk = .T.
DO FORM logo.SCX
READ events
ELSE
**notify user
ENDIF


* Close tables to avoid Set Multilocks error in oEnv.RestoreSets
Close Databases

* remove shutdown setting and window
On Shutdown
Release Windows UlasShut

* close remaining libraries

* EOF - Sys1Main.prg
************************************
Thanks in Advance.

J. Turner
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform