Hi,
In start of my application, I created one splash form, in which I put the following
Init Event:
WITH This
.AutoCenter = .T.
.BorderStyle= 2 && Fixed Dialog
ENDWITH
Unload Event:
CLEAR EVENTS
There is timer on form:
Timer Event:
ThisForm.Release()
Interval: 3000
After that I have a login form, in which user put the password and ID on correct entry it opens MainMenu.scx forms.
The problem is it opens splash screen but hanged on password form.
The code of the main.prg is as follows:
Kindly point out me where I am wrong?
Thanks
Saif
In start of my application, I created one splash form, in which I put the following
Init Event:
WITH This
.AutoCenter = .T.
.BorderStyle= 2 && Fixed Dialog
ENDWITH
Unload Event:
CLEAR EVENTS
There is timer on form:
Timer Event:
ThisForm.Release()
Interval: 3000
After that I have a login form, in which user put the password and ID on correct entry it opens MainMenu.scx forms.
The problem is it opens splash screen but hanged on password form.
The code of the main.prg is as follows:
Code:
On Shutdown Do cleanup()
*-------------------------------------------
*--
*-- Runtime Mode Application Startup Program
*--
*-- Entry point for front-end application
*--
*-------------------------------------------
*-- Include
*-- Clear all at first
Clear
Clear Dlls
Release All Extended
Clear All
Public debugmode && TRUE when running within VFP, FALSE for standalone program
Public gchomepath && Working directory
Public want_to_exit
Set Path To
Set Defa To
*=setpath()
*lcdefaultpath = gchomepath
lcDefaultPath = JUSTPATH(SYS(16))
*lcdefaultpath = 'd:\vtts'
Set Default To (lcdefaultpath)
= set_app_paths()
*SET PROCEDURE TO ('procs\Measure')
Set Exclusive Off
Set Multilocks On
Do Locfile("system.app")
DO FORM ('spscreen1.scx')
READ EVENTS
Do Form ('userid.scx')
Do Form ('mainmenu.scx')
Read Events
Release All
Clear All
Close All
Clear Dlls
Release All Extended
Clear All
Clear Events
On Error
On Shutdown
If _vfp.StartMode = 0
Return To Master
Else
Quit
Endif
*--------------------------------------------
Procedure set_app_paths
Set Path To lcdefaultpath + '\' Additive
Set Path To lcdefaultpath + '\data' Additive
Set Path To lcdefaultpath + '\forms' Additive
Set Path To lcdefaultpath + '\graphics' Additive
Set Path To lcdefaultpath + '\graphics\heads' Additive
Set Path To lcdefaultpath + '\graphics\icons' Additive
Set Path To lcdefaultpath + '\graphics\logo' Additive
Set Path To lcdefaultpath + '\graphics\others' Additive
Set Path To lcdefaultpath + '\graphics\products' Additive
Set Path To lcdefaultpath + '\graphics\skins' Additive
Set Path To lcdefaultpath + '\graphics\skins\backgrounds' Additive
Set Path To lcdefaultpath + '\graphics\sound' Additive
Set Path To lcdefaultpath + '\graphics\staff\images' Additive
Set Path To lcdefaultpath + '\help' Additive
Set Path To lcdefaultpath + '\junk' Additive
Set Path To lcdefaultpath + '\libs' Additive
Set Path To lcdefaultpath + '\menus' Additive
Set Path To lcdefaultpath + '\others' Additive
Set Path To lcdefaultpath + '\progs' Additive
Set Path To lcdefaultpath + '\query' Additive
Set Path To lcdefaultpath + '\reports' Additive
Set Path To lcdefaultpath + '\foxbarcode' Additive
Set Path To lcdefaultpath + '\foxbarcode\docs' Additive
Set Path To lcdefaultpath + '\foxbarcode\forms' Additive
Set Path To lcdefaultpath + '\foxbarcode\images' Additive
Set Path To lcdefaultpath + '\foxbarcode\samples' Additive
Set Path To lcdefaultpath + '\foxbarcode\reports' Additive
Set Path To lcdefaultpath + '\foxbarcode\source' Additive
Set Path To lcdefaultpath + '\foxyview' Additive
Set Path To lcdefaultpath + '\foxyview\sampledistribproject' Additive
Set Path To lcdefaultpath + '\foxyview\sampledistribproject\exe' Additive
Set Path To lcdefaultpath + '\foxyview\source' Additive
Set Path To lcdefaultpath + '\foxyview\source\images' Additive
Endproc
*--------------------------------------------
*-- Set path to application working directory
*--------------------------------------------
Function setpath()
*-----------------
Local lcpath, lcbuffer
Local lnstart
lcpath = Sys(16) && Where we were executed...
lnstart = At("\\", lcpath)
If lnstart = 0
lnstart = At(":", lcpath) - 1
Endif
If lnstart > 0
lcpath = Substr(lcpath, lnstart) && Derive program name
Endif
gchomepath = Left(lcpath, Rat("\", lcpath)) && ... and path to it
*-- Change current directory to working...
Cd (gchomepath)
*-- If we are running MAIN.PRG directly, then
*-- CD up to the parent directory
If Right(lcpath, 3) = "FXP"
*-- One level up
Cd ..
*-- Assume we were run from VFP
debugmode = .T. &&TRUE
*-- Make out path to INI file
gchomepath = Left(gchomepath, Rat("\", gchomepath, 2))
*-- Ensure the project manager is closed
Deactivate Window "Project Manager"
Endif
*-- Set all pathes
Set Default To (gchomepath)
Function cleanup
*If want_to_exit
Clear Events
Clear All
Release All
On Error
On Shutdown
If _vfp.StartMode = 0
Return To Master
Else
Quit
Endif
*Endif
*-- End of program
Kindly point out me where I am wrong?
Thanks
Saif