Ver Mensaje Individual
  #3  
Antiguo 18-07-2003
Avatar de madman
madman madman is offline
Miembro
 
Registrado: may 2003
Ubicación: Nayarit, México
Posts: 242
Reputación: 21
madman Va por buen camino
Cita:
Texto escrito por magneto:
...no suelo trabajar con esos componentes...
Propiamente dicho los ShowMessage y MessageBox, son funciones y que nos ayudan a mostrar un mensaje simple o un cuadro de mensaje con varias opciones (Si,No,Guardar, etc.)

Sacado de la ayuda de Delphi.
Código:
ShowMessage(const Msg: WideString);

function MessageBox(const Text, Caption: PChar; Flags: Longint = MB_OK): Integer;
Value	Meaning

MB_ABORTRETRYIGNORE	The message box contains three push buttons: Abort, Retry, and Ignore.
MB_OK	The message box contains one push button: OK. This is the default.
MB_OKCANCEL	The message box contains two push buttons: OK and Cancel.
MB_RETRYCANCEL	The message box contains two push buttons: Retry and Cancel.
MB_YESNO	The message box contains two push buttons: Yes and No.
MB_YESNOCANCEL	The message box contains three push buttons: Yes, No, and Cancel.

MessageBox returns 0 if there isn’t enough memory to create the message box. Otherwise it returns one of the following values:

Value	Numeric value	Meaning

IDOK	1	The user chose the OK button.
IDCANCEL	2	The user chose the Cancel button.
IDABORT	3	The user chose the Abort button.
IDRETRY	4	The user chose the Retry button.
IDIGNORE	5	The user chose the Ignore button.
IDYES	6	The user chose the Yes button.
IDNO	7	The user chose the No button.

Ejemplo:
ShowMessage('Alerta el Windows se colapsará'); // Un ejemplo enfocado a la vida real :D

MessageBox('This should be on top.', 'Look', [mb_OK]);
Este otro te permite ponerlo en la posicion X,Y
Código:
procedure ShowMessagePos(const Msg: WideString; X, Y: Integer);
Cita:
Texto escrito por magneto:
...si los creás, luego podés cambiar las propiedades que tengan. Los Forms, por ejemplo, tienen una propiedad que es Position, en la que se puede elegir una opcion ScreenCenter, que hace que aparezca en el centro de la pantalla (hay unas cuántas más opciones además de esa)....
Una solución temporal, es hacerte de tus propios Cuadros de
Mensaje con unos Forms. Y centrarlos...

Esto hasta que alguien te de con la respuesta que solicitas.
__________________
Guía de Estilo.
Responder Con Cita