Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Wait Window location
Message
 
À
11/02/2003 10:10:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00747808
Message ID:
00751905
Vues:
15
This method positions the Wait Window just above and left aligned with toObject. If toObject is close to the right edge of the screen, it moves the wait window to the left so it does not run off the screen. It does not account for tool bars.


>Very nice. Are you sure you want to use srows() and not wrows()? Since you are also using sysmetric, are you trying to center on the main vfp window in stead of the form? Or did I miss something? Thanks for the posting the code!
>
>Tracy
>
>
>>Thanks all for the help. I solved the problem with the following method. It still needs a little work.
>>
>>
>>*** This method displays a Wait Window containing txMessage, just above toObject.
>>***   Include .T. for tlClear or tlWait if you want clear the message or wait for a key press.
>>***  Examples from text box Valid methods:
>>***		THISFORM.WaitWindow("Note: Division has also been reset. Tap any key to continue.", THIS, .T., .T.)
>>***		THISFORM.WaitWindow("Please enter an Estimate greater than or equal to zero.", THIS)
>>
>>LPARAMETERS tcMessage, toObject, tlClear, tlWait
>>
>>IF ! tlClear
>>    tcClear = "NOCLEAR"
>>ELSE
>>    tcClear = ""
>>ENDIF
>>IF ! tlWait
>>    tcWait = "NOWAIT"
>>ELSE
>>    tcWait = ""
>>ENDIF
>>
>>TitleHeight = SYSMETRIC(9)
>>FrameHeight = SYSMETRIC(11)
>>MenuHeight = SYSMETRIC(20)
>>ScreenRows = SROWS()
>>PixelsPerRow = _screen.Height / ScreenRows
>>
>>*** All objects on this form are enclosed in 2 page frames, that is the reason for the parent.parent
>>*** This needs to be changed to automatically search the object for parent containers
>>RowStartPixel =  _Screen.Top + ThisForm.Top +  toObject.Top + toObject.parent.parent.Top + ;
>>	toObject.parent.parent.parent.parent.Top + 2 * FrameHeight +  MenuHeight + 3 * TitleHeight
>>lnRow = RowStartPixel / PixelsPerRow
>>
>>FrameWidth = SYSMETRIC(10)
>>ScreenCols = SCOLS()
>>PixelsPerColumn = _screen.Width / ScreenCols
>>ScreenWidth = SYSMETRIC(1)
>>MessageWidth = ThisForm.TextWidth(tcMessage)
>>ColumnStartPixel = _Screen.Left + ThisForm.Left +  toObject.Left + toObject.parent.parent.Left ;
>>		+ toObject.parent.parent.parent.parent.Left +  2 * FrameWidth
>>IF MessageWidth + ColumnStartPixel  > ScreenWidth
>>    ColumnStartPixel  = ColumnStartPixel - MessageWidth + toObject.Width
>>ENDIF
>>lnCol = ColumnStartPixel / PixelsPerColumn
>>
>>*** Adding 1 to the row and column makes it display in the right location????
>>WAIT tcMessage WINDOW AT lnRow + 1, lnCol + 1 &tcWait &tcClear
>>
Dennis Lindeman
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform