Autor Beitrag
Nowo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 108



BeitragVerfasst: Di 10.10.06 20:26 
Hallo

ich habe z.B. eine Form die keine Taskleiste hat.
Sie soll trotzdem verschiebbar sein.

Klar... nach ca.10 sekunden googlen fand ich das:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TForm1.WMNCHitTest (var M: TWMNCHitTest);
begin
  inherited;
  if M.Result = htClient then M.Result := htCaption;
end;


so... schonmal ein Anfang.
Nun kann ich das Formular mit allem verschieben was kein Objekt ist.
Aber ich will es so haben... das es sich NUR verschieben lässt wenn man ein bestimmtes "Image" anklickt/anwählt/OnMousDown.


PS: der Grund: ich habe mir eine eigene Taskleiste als Dild eingefügt.
Und bei "Drag" auf dem Bild soll sich halt das Formular
verschieben lassen.


Hoffe ihr könnt mir helfen

mfG Nowo
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Di 10.10.06 20:28 
Verwechselst du Taskleiste mit Titelleiste? :mahn:

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
_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 10.10.06 20:33 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure TForm1.Image1MouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  if ssLeft in Shift then 
  begin
    ReleaseCapture;
    Self.Perform(WM_NCLBUTTONDOWN,HTcaption,0);
  end;
end;


HTH Frank
Nowo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 108



BeitragVerfasst: Di 10.10.06 20:55 
So Antworten liebe ich ^^
:!: Danke Frank :!:
Funkioniert einwandfrei !!! :D


(ähm kleine Frage am Rand... fällt mir grade ein und will dafür aber keinen neuen Thread erstellen:
Wie kann ich die Startposition einer Form bestimmt ? also wo auf dem Bildschirm sie erscheinen soll wenn sie
gestartet wird )
_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 10.10.06 21:06 
TForm.Left/Top??
(Position auf poDesigned)

HTH Frank
Nowo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 108



BeitragVerfasst: Di 10.10.06 21:11 
ähm ja.. vielen Danke aber ich meinte eher.. sowas wie X-Achse Y-Achse.
Oder z.B. das sich das 2te fenster IMMER neben dem ersten öffnet...
_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 10.10.06 21:16 
du kannst doch left/top vor dem Anzeigen ändern und da z.b. an ein anderes Form anpassen

ausblenden Delphi-Quelltext
1:
2:
3:
form2.top:=form1.top;
form2.left:=form1.left+form1.width;
form2.show;


Hoffe, ich hab dich richtig verstanden, wenn nicht musst du dein Problem weiter erläutern...

Gruß Frank
Nowo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 108



BeitragVerfasst: Di 10.10.06 21:29 
Jop, vielen vielen Dank.

Alles funkioniert.