AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Spielherstellung

Ein Thema von Hirnsausen · begonnen am 6. Sep 2006 · letzter Beitrag vom 8. Sep 2006
Antwort Antwort
Benutzerbild von SirThornberry
SirThornberry
(Moderator)

Registriert seit: 23. Sep 2003
Ort: Bockwen
12.235 Beiträge
 
Delphi 2006 Professional
 
#1

Re: Spielherstellung

  Alt 6. Sep 2006, 06:38
das einfachste wäre wohl von TCustomControl abzuleiten und im SetBounds mit CreatePolygonRgn die sechseckige Form setzen
Je nach Muster zum Beispiel so
Delphi-Quellcode:
procedure TMyComp.SetBounds(ALeft, ATop, AWidth, AHeight: Integer);
var
  HR : Cardinal;
  lPoints: Array[0..5] of TPoint;
  lWidth: Integer;
begin
  lWidth := AWidth div 4;
  lPoints[0] := Point(lWidth, 0);
  lPoints[1] := Point(AWidth - lWidth, 0);
  lPoints[2] := Point(AWidth - 1, AHeight div 2);
  lPoints[3] := Point(AWidth - lWidth, AHeight - 1);
  lPoints[4] := Point(lWidth, AHeight - 1);
  lPoints[5] := Point(0, AHeight div 2);
  HR:= CreatePolygonRgn(lPoints, 6, ALTERNATE);
  SetWindowRgn(Handle, HR, True);

  DeleteObject(HR);
  inherited;
end;
Jens
Mit Source ist es wie mit Kunst - Hauptsache der Künstler versteht's
  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 22:14 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz