Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MessageDlg StyOnTOp

272 views
Skip to first unread message

Augusto 'The Gus' Pellis

unread,
Sep 30, 2003, 2:57:01 AM9/30/03
to
Good morning everyone.
Is it possible (an how ;-) to make changes in Delphi's units (maybe
Dialogs.pas?) in order to obtain a MessageDlg which puts its message from
ALWAYS on top of the other forms in the application?

Thank you very much for your help

Augusto Pellis


Sang Tang

unread,
Sep 30, 2003, 3:47:36 AM9/30/03
to
try this.
Application.NormalizeTopMosts;
MessageDlg('Record Saved', mtInformation, [mbOK], 0);
Application.RestoreTopMosts;


"Augusto 'The Gus' Pellis" <augusto...@socratenet.com> wrote in message
news:3f79...@newsgroups.borland.com...

Augusto 'The Gus' Pellis

unread,
Sep 30, 2003, 8:38:43 AM9/30/03
to
It doesn't work..topmost form remain over the dialogue form

Maybe overriding (how?) the creation of the messageform and giving it new
createparams.style?

tnx

Augusto

"Sang Tang" <ST...@abcmts.net> ha scritto nel messaggio
news:3f79...@newsgroups.borland.com...

Peter Below (TeamB)

unread,
Sep 30, 2003, 2:43:41 PM9/30/03
to
In article <3f79...@newsgroups.borland.com>, Augusto 'The Gus' Pellis
wrote:

> Is it possible (an how ;-) to make changes in Delphi's units (maybe
> Dialogs.pas?) in order to obtain a MessageDlg which puts its message from
> ALWAYS on top of the other forms in the application?

Well, you can do that, if you do not need to build your applications with
run-time packages. Just copy the dialogs.pas file to your programs source
directory and modify it. Take care to only modify things in the
Implementation section, otherwise you will get problems with other vCL
units that use DIalogs.

There is a less intrusive way, however: simply do not use MessageDlg or
ShowMessage, use Windows.MessageBox instead. Including MB_TASKMODAL in the
flags gets you what you seem to want. MB_SYSTEMMODAL goes a step further
still. You can pass Application.Handle as first parameter, or the handle of
a specific form.


--
Peter Below (TeamB)
Use the newsgroup archives :
http://www.mers.com/searchsite.html
http://www.tamaracka.com/search.htm
http://groups.google.com
http://www.prolix.be


Augusto 'The Gus' Pellis

unread,
Oct 1, 2003, 3:17:21 AM10/1/03
to
Thank you very much for the useful help

Augusto

"Peter Below (TeamB)" <10011...@compuXXserve.com> ha scritto nel
messaggio news:VA.0000a47...@nomail.please...

0 new messages