Delphi-Quellcode:
procedure TForm1.PageControl3MouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
tab :TTabSheet;
position :TPoint;
bmp :TBitmap;
frm :TForm;
i :integer;
begin
inherited;
if Button = mbRight then begin
position.X:=X;
position.Y:=Y;
tab := GetTabSheet(PageControl3,position);
if tab <> nil then begin
frm := TForm.Create(Self);
frm.Width := tab.Width+10;
frm.Height := tab.Height+10;
frm.Top :=0;
frm.Left :=0;
frm.Canvas.Lock;
tab.PaintTo(frm.Canvas,frm.Top+2,frm.Left+2);
(*
for i := 0 to tab.ComponentCount-1 do begin
if (tab.Components[i] is TWinControl) then with (tab.Components[i] as TWinControl) do begin
PaintTo(frm.Canvas,top,left);
end;
end;
*)
frm.Canvas.Unlock;
frm.AlphaBlend := true;
frm.AlphaBlendValue := 200;
frm.ShowModal;
FreeAndNil(frm);
end;
end;
end;
Habs so probiert, oder alle Controls einzeln.
In beide Fällen wird ein leeres Form angezeigt.
Was muss ich noch beachten?
Gruss
Matthias
irgendwie gehts.....