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;
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;
解决方案 »
- delphi怎样连接mysql5.0
- 如何将dephi的源代码打包---急急急!在线等
- 怎么限制stringgrid里某列单元格的输入长度
- 请教大家一个表达式解析的问题(有点难度)-欢迎大家一起来讨论
- 郁闷被电信强行收取服务费,散分!!!!!!
- 怎样将quickrep的最小化按钮失效?将close按钮显示为中文提示‘关闭’
- 将paradox数据库设了密码后,在BDE及ADO中如何设置才可以正常进入??
- 散分,祝zswang(伴水)(伤心中)参与竞选斑竹,旗开得胜,马到成功,小第贿选了!!
- 是delphi高手的进来统计。看到底csdn有多少个delphi高手。我算一个,我在csdn供布了一个软件,名字叫“办公软件”,用delphi写,在大家都说我不错。所以我算一个,留名的同志要是高手,并留个理由。
- 高分悬赏,再次求助:关于socket控件如何同线程结合使用?
- delphi 将数据库内容生成word文档
- 虚拟桌面原理及实现
不过自己在做的时候,始终无法十全十美; 我无法实现的功能:
1:图片无限放大 [其实也不算无限,就是尽量放大]
2:窗体的top 不能超越顶部;总是被弹回来
3:....