Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form loading flash
Message
From
13/05/2016 03:57:48
 
 
To
12/05/2016 13:20:57
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01636239
Message ID:
01636321
Views:
80
John
when a form contains too objects it made a certain time to load and make a flicker when appear.its detected by our human eyes visual persistence.
i think ,its a normal behavior.i give you 3 experimental technics used commnunly to avoid this problem:


1-make splash screen:its a form (splash.scx) with a timer (interval=3-4 seconds to destroy the splash form) and then the second form runs and loads in this time.

in the main prg use this code
on shutdown quit
DO FORM Splash
READ EVENTS
* You can then run your main form here
 DO FORM stockEnt
 READ EVENTS
can read this msdn article: https://support.microsoft.com/en-us/kb/138497

2-can make a windows API transition named animateWindow.its a blend transtion or other transition making the form
appearing gradually (can also used when destroying the form)
-in your form load
Declare Integer AnimateWindow In WIN32API ;
		Integer HWnd, ;
		Integer dwTime, ;
		Integer dwFlags
in your form.init
        *#Define AW_SLIDE        0x00040000
	*#Define AW_ACTIVATE     0x00020000
	#Define AW_BLEND        0x00080000
	*#Define AW_HIDE         0x00010000
	#Define AW_CENTER       0x00000010
	*#Define AW_HOR_POSITIVE 0x00000001
	*#Define AW_HOR_NEGATIVE 0x00000002
	*#Define AW_VER_POSITIVE 0x00000004
	*#Define AW_VER_NEGATIVE 0x00000008

AnimateWindow (Thisform.HWnd,3000, AW_CENTER)  &&( Can use for ex: AW_center or AW_Blend-can try others and get best result)
3-make a timer on your main form (enabled=.t.,interval=5000) and make your form invisible with (visible=.f.)
in the timer method (after sec)
thisform.visible=.t.
this.enabled=.f.
your form have the time to load and appear after 5seconds.
Previous
Reply
Map
View

Click here to load this message in the networking platform