sábado, 12 de mayo de 2007

MessageDlg, (mensaje de dialogo)

procedure TFormPrincipal.SalirClick(Sender: TObject);
var
boton:integer;
begin
boton:=MessageDlg('¿Desea guardar las modificaciones en la Base de Datos?',mtConfirmation,mbYesNoCancel,0);
if boton=6 then
begin
//GUARDA VALORES EN LA BD
Cerrar(Liga);
close;
end
else
if boton=7 then
close;
end;

--------------------


mtWarning A message box containing a yellow exclamation point symbol.
mtError A message box containing a red stop sign.
mtInformation A message box containing a blue "i".
mtConfirmation A message box containing a green question mark.
mtCustom A message box containing no bitmap. The caption of the message box is the name of the application's executable file.

-------------------

mbYes A button with 'Yes' on its face.
mbNo A button the text 'No' on its face.
mbOK A button the text 'OK' on its face.
mbCancel A button with the text 'Cancel' on its face.
mbHelp A button with the text 'Help' on its face
mbAbort A button with the text 'Abort' on its face
mbRetry A button with the text 'Retry' on its face
mbIgnore A button with the text 'Ignore' on its face
mbAll A button with the text 'All' on its face

---------------------

MB_ABORTRETRYIGNORE La ventana contiene tres botones:
Abortar, Reintentar e Ignorar.
MB_ICONEXCLAMATION Aparece un icono de exclamación en la ventana.
MB_ICONINFORMATION Se trata de un icono con una 'i' en un bocadillo.
MB_ICONQUESTION Es un icono con una interrogación.
MB_ICONSTOP Se trata de un icono con un signo de STOP.
MB_OK La ventana contiene un botón de Aceptar.
MB_OKCANCEL La ventana contiene dos botones: Aceptar y Cancelar.
MB_RETRYCANCEL La ventana contiene dos botones: Reintentar
y Cancelar.
MB_YESNO La ventana contiene dos botones: Sí y No.
MB_YESNOCANCEL La ventana contiene tres botones:
Sí, No, y Cancelar.

Si, por ejemplo, queremos una vetana con un icono de exclamación y los botones correspondientes a la constante MB_YESNOCANCEL, pondremos en el parámetro Tipo de la función lo siguiente:


MB_ICONEXCLAMATION + MB_YESNOCANCEL

No hay comentarios: