Einzelnen Beitrag anzeigen

uschi
(Gast)

n/a Beiträge
 
#2

Re: Form immer in der rechten unteren Bildschirmecke anzeige

  Alt 23. Jun 2005, 11:18
Hallo!

Das kann ich dir sagen wie das geht!
Soll ich? OK!

Delphi-Quellcode:
procedure TfrmMain.SetWindow;
var hWnd: THandle;
    Rect: TRect;
    TaskbarHeight: Integer;
begin
  FileList:=TStringList.Create;
  hWnd := FindWindow('Shell_TrayWnd', nil);
  GetWindowRect(hWnd, Rect);
  TaskbarHeight := Rect.Bottom - Rect.Top;
  MoveWindow(handle,screen.Width - self.Width,(screen.Height-self.Height)-TaskbarHeight,self.Width,self.Height,true);

  SetWindowPos(Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOSIZE or SWP_NOACTIVATE);
  FormStyle:=fsStayOnTop;
  SetWindowPos(Handle, HWND_TOPMOST, Self.Left, Self.Top, Self.Width, Self.Height, SWP_NOSIZE);
  if GetForeGroundWindow <> Handle then
    BringToFront;
end;
  Mit Zitat antworten Zitat