 |
| How to change the name and the size of the font in the MessageBox dialog |
User rating: 0/10 (0 votes) | |
|
|
 |
 |
| Before you begin: |
 |

There is more advanced version of this code.
Click to open the Extended MessageBox Library (FLL) web page.
* * *

This code sample demonstrates another hidden MessageBox capability that can be reached by FoxPro applications. See also Using Extended MessageBox() Class example in this reference.
See also:
|
 |
 |
| |
| |
Members area. Log in to view this example. |
|
| |
|
|
|
|
|
 |
User rating: 0/10 (0 votes) | |
| 3688 bytes Created: 2004-03-15 09:33:25 Modified: 2009-11-12 17:26:58 Visits in 7 days: 173 |
|
 |
 |
| Listed functions: |
 |
|
 |
 |
| My comment: |
 |
Setting the font size to a larger value can cut part of the message off. This happens because of the MessageBox function calculating the size for the message rectangle based on the default font.
By adding some extra CHR(13) characters (the carriage returns) the height of the message can be artificially increased. This solves the problem though only partially.
Ideally the size of the message rectangle must be re-calculated by the calling application, which then also should resize the message window and resize and reposition all other windows accordingly.
* * *
Even better MessageBox customization can be achieved by creating an external library (ActiveX, DLL or FLL) and calling it from VFP application.

The background color, the message text font & color, button fonts and captions, not to mention other customizable parameters, can be controlled by the calling application.
* * *
The MessageBox dialog consists of several windows.

The Dialog Window is the parent window, and all others are its children: the message window, the icon window and the buttons.
The Tool window (its Control ID 0x0000CAFE always makes me feel good) is an addition to the MessageBox child windows that came with the Vista.
|
 |
 |
| Word Index links for this example: |
 |
|
|
 |
 |
| Translate this page: |
 |
|