AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Win32/Win64 API (native code) Delphi Rand eines Windows nicht anzeigen
Thema durchsuchen
Ansicht
Themen-Optionen

Rand eines Windows nicht anzeigen

Ein Thema von 3_of_8 · begonnen am 27. Jan 2006 · letzter Beitrag vom 4. Feb 2007
Antwort Antwort
Seite 3 von 3     123   
Benutzerbild von 3_of_8
3_of_8

Registriert seit: 22. Mär 2005
Ort: Dingolfing
4.129 Beiträge
 
Turbo Delphi für Win32
 
#21

Re: Rand eines Windows nicht anzeigen

  Alt 2. Feb 2007, 22:08
1. war nach nonVCL gefragt, daher ist borderstyle:=bsNone; nicht möglich.
2. ich wollte das Ding nicht skalieren können.
Manuel Eberl
„The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it.“
- Terry Pratchett
  Mit Zitat antworten Zitat
informix05
(Gast)

n/a Beiträge
 
#22

Re: Rand eines Windows nicht anzeigen

  Alt 4. Feb 2007, 12:52
Zitat von 3_of_8:
1. war nach nonVCL gefragt, daher ist borderstyle:=bsNone; nicht möglich.
2. ich wollte das Ding nicht skalieren können.
Sorry, hab ich wohl auch falsch verstanden.

Aber jetzt habe ich eine ähnliches Problem: ich habe ein anderes Programm (nicht mit Delhpi und nicht von mir erstellt), das ein Fenster ohne Titelleiste u. Rand hat. Diesem Fenster möchte ich nun mit einem Delphi-Programm Titelleiste u. Rand hinzufügen. Mit SetWindowLong(...) etc. bekomme ich das nicht hin. Hast du mittlerweile eine Lösung für dein Problem?
  Mit Zitat antworten Zitat
informix05
(Gast)

n/a Beiträge
 
#23

Re: Rand eines Windows nicht anzeigen

  Alt 4. Feb 2007, 13:12
Heureka, Rand verstecken bzw. anzeigen mit SetWindowLong(...) funktiniert schon, man muss danach aber noch über SetWindowPos(...) eine SWP_FRAMECHANGED Message senden, damit Windows den geänderten Rand auch neu zeichnet:

Delphi-Quellcode:
//*** Titelleiste u. Rand eines Fenster verstecken ***
procedure TForm1.Button_HideBorderClick(Sender: TObject);
var
   dwStyle : Cardinal;
   hWnd : THandle;
begin
   hWnd := FindWindow(nil, 'PowerPoint-Bildschirmpräsentation - [gruenes_licht.pptm]');
   dwStyle := GetWindowLong(hWnd, GWL_STYLE);
   SetWindowLong(hWnd, GWL_STYLE, dwStyle and not WS_OVERLAPPEDWINDOW);
   SetWindowPos(hWnd, 0, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOREPOSITION or SWP_NOSIZE
      or SWP_NOZORDER or SWP_FRAMECHANGED);
end;

//*** Titelleiste u. Rand eines Fenster anzeigen ***
procedure TForm1.Button_ShowBorderClick(Sender: TObject);
var
   dwStyle : Cardinal;
   hWnd : THandle;
begin
   hWnd := FindWindow(nil, 'PowerPoint-Bildschirmpräsentation - [gruenes_licht.pptm]');
   dwStyle := GetWindowLong(hWnd, GWL_STYLE);
   SetWindowLong(hWnd, GWL_STYLE, dwStyle or WS_OVERLAPPEDWINDOW);
   SetWindowPos(hWnd, 0, 0, 0, 0, 0, SWP_NOMOVE or SWP_NOREPOSITION or SWP_NOSIZE
      or SWP_NOZORDER or SWP_DRAWFRAME or SWP_FRAMECHANGED);
end;
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 3 von 3     123   


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:47 Uhr.
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