Message box that works with a Delphi Service Application #49

Here is a message box that you can display from service applications. Change MB_OK to alter the buttons that appear. If you want the return value from MessageBoxEx change PopServiceBox into a function.

procedure PopServiceBox(Title, Text: string);
begin
  MessageBoxEx(
    0, PChar(Text), PChar(Title),
    MB_OK or MB_TOPMOST or MB_SERVICE_NOTIFICATION, 0
  );
end;
Author: Joe Donth
Contributor: Joe Donth
Added: 2007/08/14
Last updated: 2007/08/14