AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Win32/Win64 API (native code) Delphi Weißer Rand beim entfernen von WS_SIZEBOX
Thema durchsuchen
Ansicht
Themen-Optionen

Weißer Rand beim entfernen von WS_SIZEBOX

Ein Thema von Neutral General · begonnen am 10. Okt 2007 · letzter Beitrag vom 10. Okt 2007
Antwort Antwort
Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#1

Weißer Rand beim entfernen von WS_SIZEBOX

  Alt 10. Okt 2007, 13:22
Hi,

Ich ändere mit folgendem Code den Style eines Fensters.

Delphi-Quellcode:
procedure TNVCLForm.SetSizeable(const Value: Boolean);
var old: Cardinal;
begin
  old := GetWindowLong(FHandle,GWL_STYLE);
  if Value then
    SetWindowLong(FHandle,GWL_STYLE,old or WS_SIZEBOX)
  else
    SetWindowLong(FHandle,GWL_STYLE,old and not WS_SIZEBOX);
  FSizeable := Value;
end;
Wenn ich jetzt von mit-Sizebox auf ohne-Sizebox wechsele bekomme ich einen unschönen weißen Rand (Anhang). Was mach ich dagegen? (Hab den weißen Rand rot gefärbt damit man ihn besser erkennt)

Gruß
Neutral General
Miniaturansicht angehängter Grafiken
sizebox_113.jpg  
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat
Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#2

Re: Weißer Rand beim entfernen von WS_SIZEBOX

  Alt 10. Okt 2007, 13:46
Hi,

Hab ne Lösung gefunden.. Falls jemand das gleiche Problem hat:

Man muss nachdem man den Rahmen ändert folgendes aufrufen:

Delphi-Quellcode:
// // !wichtig! //
SetWindowPos(hwnd,0, 0, 0, 0, 0,SWP_NOZORDER or SWP_NOSIZE or SWP_NOMOVE or SWP_DRAWFRAME);
Gruß
Neutral General
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat
Antwort Antwort


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:22 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