Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Non-modal dialog form not overlapping by main form

Status
Not open for further replies.

ChupaChups

Programmer
Jun 2, 2004
5
BY
I need to show non-modal form over the main application form so as the former could not be overlapped by the latter (i.e. like 'Find' dialod)
 
cant remember the name (dont have delphi in front om me)
theres a property for the form that you can set to stayontop.

Aaron Taylor
John Mutch Electronics
 
Second form should not be overlapped by application's main form only, but not stay on top of desktop.

Chupa-Chups - Oral Pleasure :D
 
Hi ChupaChups,

use ShowModal instead of Show. like this :

Code:
procedure showmymodalform;
var mymodalform: tmodalform;
...
begin
 mymodalform:=tmymodalform.create(self);
 mymodalform.showmodal;
end;

cheers

--------------------------------------
What You See Is What You Get
 
please clarify a bit more on what your wanting to do.
you dont want modal, you dont want stay on top, what do you want ?

Aaron Taylor
John Mutch Electronics
 
if the form2 is modal then you cant do anything to form1 until its closed.

if form2 is stayontop then you can do things to form1 while form2 is open and it wont dissapear behind form1.

if you want form2 to stay confind to form1's boundaries then form1 should be mdi and form2 sdi.

Aaron Taylor
John Mutch Electronics
 
If Form2 is stayontop then it wont dissapear behind _any_ form of _any_ application.

I want the effect like in Visual Basic, when executing:
Form2.Show vbModeless, Form1

In this case Form1 becomes Form2's owner. But I didn't find similar methods in Delphi.

P.S. Press Ctrl + F in IE, Word, etc. - I want such result :)

Chupa-Chups - Oral Pleasure :D
 
If Form2 is stayontop then it wont dissapear behind _any_ form of _any_ application.

it wont dissapear behind the parent app if you load another app it will.

Aaron Taylor
John Mutch Electronics
 
Oops, true :p I simply set fsStayOnTop for main form so it was over _all_ forms :)

Sorry for my folly and thanx to aaron! :D

Chupa-Chups - Oral Pleasure :D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top