Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Centering a window
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00584694
Message ID:
00584725
Views:
25
>I am using WAIT WINDOW to display a status message to the user. I want to center this message on the screen. I am aware that this command has the AT clause, but I am not sure how to get it to center properly/consistently. Does anyone know how to make this work? Or does anyone have an alternative to using the WAIT WINDOW for displaying status type (ie "Searching...", "Please wait...") messages to the user.

Using WAIT WINDOW and _screen.scalemode=0 (foxels) you could center a message like so:
cMsg = "My Message"
_Screen.Scalemode = 0
Wait Window cMsg At Int(_Screen.Height/2), Int(_Screen.Width/2 - Len(cMsg) / 2)
You could change ScaleMode back to the default of 3 if need be after this. This can probably be nicely wrapped in a function or method. HTH
Previous
Reply
Map
View

Click here to load this message in the networking platform