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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

what settings does my form need to work right? 1

Status
Not open for further replies.

CADTenchy

Technical User
Dec 12, 2007
237
GB

I have my main app, which already has a secondary form which is called modally, no probs.

Now I have a new form, which is a little calculator essentially.
This form I don't want modal, I want to be able to leave it showing and do stuff in both this daughter form and the main form.

I am showing the calculator by just setting visible property to true when select it from the menu.
This is nice, if I click the X in top right (no other buttons) it goes away, show it again from main form it's back and in last state used. All good.

My problem is, I may well want main app full screen on a laptop and use ALT TAB to show the calculator.
But as far as the taskbar and wndows controls is concerned, the calculator form does not exist. If I get the calculator behind main form only way to get at it again is to drag mainform out of the way.

Is there a setting or method to achieve what I want. I've seen the stayontop property, but I don't want that.

It may be worth stating that my project is an SDIapp.


Steve (Delphi 2007 & XP)
 
The new form would be tied to the main app. ALT+TAB in Windows only works with applications in question. You might be able to have a setting or hotkey (not ALT+TAB)within your app to bring it to the front.

----------
Measurement is not management.
 

Thanks DjangNan!

This is the one that worked first time:

Code:
.
.
.
    procedure CreateParams(var Params: TCreateParams); override;
  private
    { Private declarations }
  public
    { Public declarations }
  end;
.
.
.
.

implementation

uses SDIMain;

{$R *.dfm}

procedure TForm2.CreateParams(var Params: TCreateParams);
begin
 inherited CreateParams(Params);
 Params.WndParent := 0;
end;

Steve (Delphi 2007 & XP)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top