Autor Beitrag
Niko S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 566
Erhaltene Danke: 10

Win 7, Ubuntu
Lazarus, Turbo Delphi, Delphu 7 PE
BeitragVerfasst: Sa 29.04.06 09:31 
öhm ich haette da mal ne frage ^^

ich wollte nen programm mit sozusagen eigenem style machen also als hintergrund nen bild und so

nun es würde auch alles gehen soweit reicht meine erfahrung aus doch

ich kann das fenster nicht bewegen wenn Borderstyle := bsNone
is x.x

wie kreig ich also hin das man das fenster verschieben kann wenn ik das bsNone habe?

Thx für antwort :P
Xion
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
EE-Maler
Beiträge: 1952
Erhaltene Danke: 128

Windows XP
Delphi (2005, SmartInspect), SQL, Lua, Java (Eclipse), C++ (Visual Studio 2010, Qt Creator), Python (Blender), Prolog (SWIProlog), Haskell (ghci)
BeitragVerfasst: Sa 29.04.06 09:39 
hi

würde sagen du musst das so ähnlich machen, wie wenn du ein label verschieben würdest. also mit hilfe der maus-position bei onmousemove die Form (Form.Left/Form.Top) verschieben. hab sowas aber noch nie gemacht ;)

Xion

_________________
a broken heart is like a broken window - it'll never heal
In einem gut regierten Land ist Armut eine Schande, in einem schlecht regierten Reichtum. (Konfuzius)
Xion
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
EE-Maler
Beiträge: 1952
Erhaltene Danke: 128

Windows XP
Delphi (2005, SmartInspect), SQL, Lua, Java (Eclipse), C++ (Visual Studio 2010, Qt Creator), Python (Blender), Prolog (SWIProlog), Haskell (ghci)
BeitragVerfasst: Sa 29.04.06 09:47 
hab da etwas code gebastelt, im prinzip funktionierst (naja, so einigermaßen), aber er malt die Form jedesmal neu hin, und macht die alte nicht weg. sieht ziemlich blöd aus :wink:

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:
var
  Form1: TForm1;
  MousePress: boolean;

implementation

{$R *.dfm}

procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
 Form1.Left:=X;
 Form1.Top:=Y;
 MousePress:=true;
end;

procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
  if MousePress=True then
  begin
   Form1.Left:=X;
   Form1.Top:=Y;
  end;
end;

procedure TForm1.FormMouseUp(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
 MousePress:=False;
end;


Moderiert von user profile iconmatze: Code- durch Delphi-Tags ersetzt

_________________
a broken heart is like a broken window - it'll never heal
In einem gut regierten Land ist Armut eine Schande, in einem schlecht regierten Reichtum. (Konfuzius)
Xion
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
EE-Maler
Beiträge: 1952
Erhaltene Danke: 128

Windows XP
Delphi (2005, SmartInspect), SQL, Lua, Java (Eclipse), C++ (Visual Studio 2010, Qt Creator), Python (Blender), Prolog (SWIProlog), Haskell (ghci)
BeitragVerfasst: Sa 29.04.06 09:54 
das problem ist, man bräuchte die position von der maus auf dem bildschirm, nicht auf der form :gruebel:

_________________
a broken heart is like a broken window - it'll never heal
In einem gut regierten Land ist Armut eine Schande, in einem schlecht regierten Reichtum. (Konfuzius)
Xion
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
EE-Maler
Beiträge: 1952
Erhaltene Danke: 128

Windows XP
Delphi (2005, SmartInspect), SQL, Lua, Java (Eclipse), C++ (Visual Studio 2010, Qt Creator), Python (Blender), Prolog (SWIProlog), Haskell (ghci)
BeitragVerfasst: Sa 29.04.06 09:57 
ich habs jetzt ;)

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:
var
  Form1: TForm1;
  MousePress: boolean;

implementation

{$R *.dfm}

procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
 Form1.Left:=Mouse.CursorPos.X-10;
 Form1.Top:=Mouse.CursorPos.Y-10;
 MousePress:=true;
end;

procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
  if MousePress=True then
  begin
   Form1.Left:=Mouse.CursorPos.X-10;
   Form1.Top:=Mouse.CursorPos.Y-10;
  end;
end;

procedure TForm1.FormMouseUp(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
 MousePress:=False;
end;


so funktionierts wunderbar ;)

Moderiert von user profile iconmatze: Code- durch Delphi-Tags ersetzt

_________________
a broken heart is like a broken window - it'll never heal
In einem gut regierten Land ist Armut eine Schande, in einem schlecht regierten Reichtum. (Konfuzius)
Niko S. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 566
Erhaltene Danke: 10

Win 7, Ubuntu
Lazarus, Turbo Delphi, Delphu 7 PE
BeitragVerfasst: Sa 29.04.06 10:11 
danke :D

würde das auch gehn hald das die maus da bleibt wo sie sit und dasn fesnter auch also das nich das fenster so springt an der bestimmten stelle aber hald nicht das es ausseiht wie beim ersten versuch das ist voll komisch xD

aber so ist das schon perfekt thx ;D
Xion
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
EE-Maler
Beiträge: 1952
Erhaltene Danke: 128

Windows XP
Delphi (2005, SmartInspect), SQL, Lua, Java (Eclipse), C++ (Visual Studio 2010, Qt Creator), Python (Blender), Prolog (SWIProlog), Haskell (ghci)
BeitragVerfasst: Sa 29.04.06 10:25 
So?

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:
var
  Form1: TForm1;
  MousePress: boolean;
  MousPosX,MousPosY: integer;

implementation

{$R *.dfm}

procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
 MousPosX:=X;
 MousPosY:=Y;
 MousePress:=true;
end;

procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
  if MousePress=True then
  begin
   Form1.Left:=Mouse.CursorPos.X-MousPosX;
   Form1.Top:=Mouse.CursorPos.Y-MousPosY;
  end;
end;

procedure TForm1.FormMouseUp(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
 MousePress:=False;
end;

end.


Moderiert von user profile iconMotzi: Code- durch Delphi-Tags ersetzt

_________________
a broken heart is like a broken window - it'll never heal
In einem gut regierten Land ist Armut eine Schande, in einem schlecht regierten Reichtum. (Konfuzius)


Zuletzt bearbeitet von Xion am Sa 29.04.06 10:35, insgesamt 1-mal bearbeitet
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Sa 29.04.06 10:30 
Es geht noch viel Einfacher.. ;)
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
type
  TForm1 = class(TForm)
  private
    { Private declarations }
  protected
    procedure WMNCHitTest(var Msg: TMessage); message WM_NCHITTEST;
  public
    { Public declarations }
  end;

procedure TForm1.WMNCHitTest(var Msg: TMessage);
begin
  Msg.Result := HTCAPTION;
end;


Gruß, Motzi

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
Niko S. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 566
Erhaltene Danke: 10

Win 7, Ubuntu
Lazarus, Turbo Delphi, Delphu 7 PE
BeitragVerfasst: Sa 29.04.06 13:39 
danke dafür ^^

ich hab ma noch ne frage (muss man ja nid extra posten)

kann man den style oder farbe von den tabs ändern?
also wenn man ein tabbed notebook hat x.x

denn ist der hintergrund vllt schwarz und die tabs da oben sind graud das sieht nicht wirklich schön aus
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Sa 29.04.06 18:08 
Neue Frage neuer Thread! :)

Und nachdem die Frage ja nun beantwortet ist - closed.

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
Dieses Thema ist gesperrt, Du kannst keine Beiträge editieren oder beantworten.

Das Thema wurde von einem Team-Mitglied geschlossen. Wenn du mit der Schließung des Themas nicht einverstanden bist, kontaktiere bitte das Team.