Delphi-PRAXiS
Seite 3 von 3     123   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi "Always in Back" (https://www.delphipraxis.net/16813-always-back.html)

Lasse2002 16. Apr 2006 13:48

Re: "Always in Back"
 
Diese Funktion wird automatisch von Delphi aufgerufen. Damit das allerdings dann auch tatsächlich passiert, mußt du sie als override deklarieren.

Delphi-Quellcode:
type
  TForm1 = class(TForm)
   // [...]
  protected
    procedure CreateParams(var Params: TCreateParams); override;
  end;

Logic 16. Apr 2006 15:02

Re: "Always in Back"
 
Du sorry bei mir klappt das nicht, wenn ich es hier hin mache:
Delphi-Quellcode:
type
  TForm1 = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    XPManifest1: TXPManifest;
    RadioButton1: TRadioButton;
    protected
    procedure CreateParams(var Params: TCreateParams); override;
    end;
  private
    { Private declarations }
  public
    { Public declarations }
  end;
kommt die Fehlermeldung:
Zitat:

[Error] Unit1.pas(20): '=' expected but identifier 'public' found
[Error] Unit1.pas(22): ';' expected but 'END' found
[Error] Unit1.pas(27): '.' expected but 'IMPLEMENTATION' found
[Error] Unit1.pas(16): Unsatisfied forward or external declaration: 'TForm1.CreateParams'
[...]
und wenn ich es hier hin mache:
Delphi-Quellcode:
type
  TForm1 = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    XPManifest1: TXPManifest;
    RadioButton1: TRadioButton;

  private
    { Private declarations }
  public
    { Public declarations }
  protected
  procedure CreateParams(var Params: TCreateParams); override;
  end;
  end;
kommt die:
Zitat:

[Error] Unit1.pas(23): 'IMPLEMENTATION' expected but ';' found
[Error] Unit1.pas(28): '.' expected but 'IMPLEMENTATION' found
[...]

fkerber 16. Apr 2006 15:05

Re: "Always in Back"
 
Hi!

Wenn ich das richtig sehe, hast du da das "end;" nach dem Funktionskopf zu viel.


Ciao Frederic

Logic 17. Apr 2006 01:09

Re: "Always in Back"
 
Hey danke, hat funktioniert... nur das Problem ist, dass mit dem Code das Form immer im Vordergrund bleibt mhh und ich will doch eigentlich genau das Gegenteil...

Logic 23. Apr 2006 13:09

Re: "Always in Back"
 
hat jemand ne Idee?

FarAndBeyond 6. Sep 2015 02:46

AW: "Always in Back"
 
Falls hier nochmal jemand landet und zum gleichen Thema 'ne Lösung braucht:

Das macht man ohne Params und ohne Timer einfach so:
Delphi-Quellcode:
Privat
Procedure WindowPosChanging(Var MSG: TWMWindowPosMsg); Message WM_WINDOWPOSCHANGING;

Procedure TForm1.WindowPosChanging(Var MSG: TWMWindowPosMsg);
 Begin
  If MSG.WindowPos.Flags And SWP_NOZORDER = 0
  Then MSG.WindowPos.HWNDInsertAfter := HWND_BOTTOM;
  Inherited;
 End;
Dann bleibt das Ding hinten auch wenn man auf die Form klickt...
(in D7 gehts ausgezeichnet)

Nur weil das Thema alt ist heißt das nicht, dass es von Google oder der internen Suche nicht mehr gefunden wird...
Daniel kann es ja wieder in die Versenkung kicken...
Information ist wichtiger als Herumgezicke... nur um das mal gleich vorneweg zu nehmen...


Alle Zeitangaben in WEZ +1. Es ist jetzt 09:38 Uhr.
Seite 3 von 3     123   

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz