Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
From control position to WAIT row
Message
De
09/08/1999 21:23:28
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
 
 
À
09/08/1999 10:22:31
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00251449
Message ID:
00251850
Vues:
10
Thanks to J. Koziol and G. Tasker for giving me pieces of this puzzle. This is the code I'm going with a start:
LPARAMETER tcMessage, toThis, toThisForm
DO CASE
CASE PCOUNT() < 1
	*!* There ain't nothin' to do
	RETURN
CASE PCOUNT() < 2 && Just put up a regular wait window.
	WAIT tcMessage WINDOW NOWAIT NOCLEAR
	RETURN
CASE toThisForm.showWindow = 0 && We're using the _screen
	lnRow = ( toThis.top + toThisForm.top + _screen.top + 2 * SYSMETRIC( 9 ) ) / ( ( _screen.height + SYSMETRIC( 9 ) ) / SROWS() )
	lnCol = ( toThis.left + toThisForm.left + _screen.left + 2 * SYSMETRIC( 10 ) ) / ( ( _screen.width + SYSMETRIC( 10 ) ) / SCOLS() )
CASE toThisForm.showWindow = 1 && toThisForm is in a top-level form
	lnRow = ( toThis.top + toThisForm.top + toThisForm.parent.top + 2 * SYSMETRIC( 9 ) ) / ( ( toThisForm.parent.height + 2 * SYSMETRIC( 9 ) )/ WROWS( toThisForm.parent.name ) )
	lnCol = ( toThis.left + toThisForm.left + toThisForm.parent.left + 2 * SYSMETRIC( 10 ) ) / ( ( toThisForm.parent.width + 2 * SYSMETRIC( 10 ) ) / WCOLS( toThisForm.parent.name ) )
OTHERWISE
	&& toThisForm is a top-level form
	lnRow = ( toThis.top + toThisForm.top + SYSMETRIC( 9 ) ) / ( toThisForm.height / WROWS( toThisForm.parent.name ) )
	lnCol = ( toThis.left + toThisForm.left + SYSMETRIC( 10 ) ) / ( toThisForm.width / WCOLS( toThisForm.parent.name ) )
ENDCASE

WAIT tcMessage WINDOW AT lnRow + 2, lnCol + 2 NOWAIT NOCLEAR
It's far from perfect placement, but at least the Wait Window bears some relevance to what is actively taking place on screen. :) I went ahead and coded for the different situations of Windows though only the first case is applicable now. Feel free to rudely point out any bugs. :-)

Oh, BTW, in the Destroy method of this class (based on custom) is a WAIT CLEAR.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform