Autor Beitrag
Bremi80
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 37

Win XP
Delphi 5 Pro/Std
BeitragVerfasst: Fr 07.10.05 11:41 
Hallo zusammen.

Ich möchte ein Windowsanwendung erstellen, die nicht wie ein normales Windowsfenster aussieht. Das heißt, daß ich die Standard Windows- Schließen, -Minimieren und -Maximieren durch eigene Buttons ersetzen will. Dann möchte ich das rechteckige Formular durch eine eigene Form ersetzen. Die neue Form soll aber nicht eckig sein, sondern zum Beispiel abgerundete Ecken haben. Im Prinzip brauche ich ein transparentes Formular, auf das ich einfach ein Bild lege. Soll etwa so funktionieren wie der Designmodus vom Windows Mediaplayer.

Danke und schönen Gruß,
Daniel
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19341
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Fr 07.10.05 11:46 
Da gibts zum Beispiel TJvFormShape aus der JEDI VCL, da machst du einfach schwarz den Umriss der Form auf weißen Hintergrund, lädst das und kannst es sogar schon zur Designzeit aktivieren.

Funktionieren tut das mit sogenannen Regions, diese werden erzeugt und können dann, um eine kompliziertere Form, zum Beispiel mit Löchern im Formular oder so, auch kombiniert werden.

Beispiel, was ich mit TJvFormShape gemacht habe:
www.buchmanager-berlin.de/Autorun.exe
Bremi80 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 37

Win XP
Delphi 5 Pro/Std
BeitragVerfasst: Fr 07.10.05 12:00 
Hi!

Vielen Dank. Deine EXE sieht ja echt gut aus. Das ist genau was ich suche.

Gruß, Daniel
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19341
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Fr 07.10.05 12:43 
:oops: Ich seh grad: Die Komponente heißt TJvTransparentForm.
Da muss das S/W-Image jedenfalls in Mask rein.

TJvFormShape gibts aber glaub ich auch, aber das is dann wohl was anderes, sorry...
mg80s
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 33

WinXP SP2
Delphi 6 Personal ;) , C# (VS 2003 Prof.)
BeitragVerfasst: Fr 07.10.05 12:48 
Wow, das ist ja _richtig_ schick. Muss ich mir wohl auch mal anschauen.
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19341
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Fr 07.10.05 13:21 
Aber vor allem (denn bevor ich das kannte, hab ich die Regionen selbst definiert und alles manuell gezeichnet):
Es ist supereinfach!!!
Damit geht das ja in wenigen Minuten und man muss auch keine große Ahnung haben! (Na ja, aber letzteres wär ja nicht mein Problem :wink: )
mg80s
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 33

WinXP SP2
Delphi 6 Personal ;) , C# (VS 2003 Prof.)
BeitragVerfasst: Fr 07.10.05 14:26 
user profile iconjaenicke hat folgendes geschrieben:
Aber vor allem ... :
Es ist supereinfach!!!
Damit geht das ja in wenigen Minuten und man muss auch keine große Ahnung haben! ...


Jetzt artet's aber langsam in ein Verkaufsgespräch aus :P :D
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19341
Erhaltene Danke: 1752

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Fr 07.10.05 14:31 
:rofl:
duri
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 23



BeitragVerfasst: Sa 11.02.06 11:30 
langsam langsam :)

damit ich das auch mal verstehe :p

Also was war das mit den shapes , damit ich die fenster verändern kann ?

wie genau ?
Fighter#1
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 787

Win XP, Ubuntu 8.04
Turbo Delphi 2006, Delphi 2005 Pe, Delphi 5 Pe, Netbeans 6.1, Eclipse, Microsoft VisualC#, Dev C++, PHP, HTML, CSS
BeitragVerfasst: Sa 11.02.06 12:00 
Wär es nicht genug das Form Unsichtbar zu machen und dann ein Shape in den Hintergrund zu setzen,
Unsichtbar meine ich die Transparency Color oder wie das heißt auf die Color des Forms zu setzen?

_________________
Wer andere beherrscht ist stark,
wer sich selbst beherrscht ist mächtig. Lao Tse
Heiko
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3169
Erhaltene Danke: 11



BeitragVerfasst: Sa 11.02.06 12:43 
Mag sein das es einfach ist, aber es verbraucht dafür mehr ressourcen (durch das speichern des Bildes und dessen Analyse). Einfacher geht es so (hier rundes Form):

ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
unit SplashScreenUnit;

interface

uses
  Windows, Graphics, Forms, Classes, Controls, ExtCtrls, jpeg;

type
  TFormSplashScreen = class(TForm)
    SplashscreenImage: TImage;
    procedure FormDestroy(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  FormSplashScreen: TFormSplashScreen;

implementation
  var FRegion: THandle;

{$R *.dfm}

procedure TFormSplashScreen.FormCreate(Sender: TObject);
begin
  FRegion:=CreateRoundRectRgn(00, Width, Height, Width, Height);
  SetWindowRgn(Handle, FRegion, True);
end;

procedure TFormSplashScreen.FormDestroy(Sender: TObject);
begin
  if FRegion<>0 then begin
    SetWindowRgn(Handle, 0, True);
    DeleteObject(FRegion);
  end;
end;

end.


Im Forum findest du auch sonst noch genug dazu ;).

//Edit: Beispiel wie es aussieht findest du bei unserem Projekt von [url=www.killprocess.de.gg]KillProcess[/url]: Project-EXE+Bass.dll


Zuletzt bearbeitet von Heiko am Sa 11.02.06 12:47, insgesamt 1-mal bearbeitet
Julian W.
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 47

Win 2000
D7 Enterprise
BeitragVerfasst: Mi 07.06.06 23:20 
Mal ne Frage :P Also wie macht man denn nu so ne Shape... Ich würd gern auch meine Form ein bisschen ummodellieren, weiß aber nicht wo ich anfangen soll.. Ich habe mir jetzt mal das JEDI VCL runtergeladen (ich hoffe das war richtig), und jetz weiß ich nich weiter. Hilfe wäre toll...
Gruß Julian
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Do 08.06.06 07:59 
Eine Lösung findest du auch in unserer Library:
www.delphi-library.d...rformenquot_320.html
Julian W.
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 47

Win 2000
D7 Enterprise
BeitragVerfasst: Do 08.06.06 16:55 
jo, danke, aber das ist nicht das was ich will...
sry, ich wills eigentlich nur so machen wie oben^^ aber ich habe keine Ahnung, wie ich das anstellen soll. Also ich finde weder JEDI VCL noch die TJvFormShape bei delphi... Bräuchte da dringend ne kleine Hilfe.. Gruß Julian
Timosch
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1314

Debian Squeeze, Win 7 Prof.
D7 Pers
BeitragVerfasst: Do 08.06.06 17:22 
Die JEDI-VCL musst du dir runterladen. Ist ne Sammlung von ca. 300 (oder 500) Komponenten. www.delphi-jedi.org/

_________________
If liberty means anything at all, it means the right to tell people what they do not want to hear. - George Orwell
Julian W.
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 47

Win 2000
D7 Enterprise
BeitragVerfasst: Fr 09.06.06 23:50 
mhm, ich habs ja runtergeladen, aber ich bekomms nich installiert.. Bin zu blöd :P kann mir nich jemand nur das mit der shape als kompo speichern und hochladen? :P Ich schau mich jetz ma im Forum um, da gibts bestimmt noch ne Anleitung zum JEDI Installieren ;)
Julian W.
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 47

Win 2000
D7 Enterprise
BeitragVerfasst: Mo 12.06.06 19:40 
Kann mir denn niemand helfen? :bawling: :bawling: :bawling:
*PUSH*
Ivo@CoMRoK
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 258

Win XP
D3 Prof., D7 Pe.
BeitragVerfasst: Mo 12.06.06 20:13 
Also ich find TransparentColor auch echt praktisch :wink: .

_________________
Fällt der Bauer tot vom Traktor, stand am Waldrand ein Reaktor.
Ein altes indianisches Sprichwort besagt:Es kann gefährlich sein gelben Schnee zu essen.
_frank_
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 343
Erhaltene Danke: 1

Win XP
Delphi 3 Prof / Turbo Delphi Explorer
BeitragVerfasst: Di 13.06.06 02:57 
evtl. nützt dir auch mein code unter www.delphi-forum.de/viewtopic.php?t=61346.
so viel musst du nicht machen um soetwas zu machen...

_________________
EB FE (die wahrscheinlich kürzeste Endlosschleife der Welt :) )
BA 01 00 00 00 52 EB 09 BB 4D 11 86 7C FF D3 EB 0D E8 F2 FF FF FF 63 68 61 72 6D 61 70 00 C3