procedure TForm1.FormMouseWheelDown(Sender: TObject; Shift: TShiftState;
  MousePos: TPoint; var Handled: Boolean);
var
   r:TRect;
begin
  R := BoundsRect;
  ChangeScale(Self.Width,Round(Self.Width*1.04));
  SetBounds(R.Left, R.Top, Width, Height);
//   self.SetBounds(self.Left,Top,Round(Self.Width*1.04)+self.left,Round(Self.Height*1.04)+self.height);
//Self.ScaleBy(Self.Height,Round(Self.Height*1.04));
//Self.ChangeScale(Self.Width,Round(Self.Width*1.04));
//  Self.Height:=Round(Self.Height*1.04);
//  Self.Width:=Round(Self.Width*1.04);
  Application.ProcessMessages;
  getpic;
end;
procedure TForm1.getpic();
var
  i:Integer;
begin
  begin
    if OpenDialog1.FileName='' then Exit;
    try
    pic:=TGPImage.Create(OpenDialog1.FileName);
    if firstopen then
    begin
      Self.Width:=pic.Width;
      Self.Height:=pic.Height;
      firstopen:=False;
      g:=TGpGraphics.Create(Self.Handle);
    end; 
    g.DrawImage(pic, 0,0, Self.Canvas.ClipRect.Right-Self.Canvas.ClipRect.Left,
      Self.Canvas.ClipRect.Bottom-Self.Canvas.ClipRect.Top);
  end;end;