delphi7 怎么全屏显示一个图片
在delphi7环境下,怎么样实现点击一个按钮,全屏显示一个图片,要求图片比超出窗体,全屏显示整个电脑屏幕~ delphi?,图片全屏显示 delphi 全屏显示 图片
[解决办法]
unit Unit13;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm13 = class(TForm)
btn1: TButton;
procedure btn1Click(Sender: TObject);
private
{ Private declarations }
L, T, W, H : integer;
public
{ Public declarations }
end;
var
Form13: TForm13;
implementation
{$R *.dfm}
procedure TForm13.btn1Click(Sender: TObject);
begin
if Self.BorderStyle = bsNone then
begin
Showwindow(Findwindow('Shell_TrayWND',nil), SW_SHOWDEFAULT);
Self.Left := L;
self.Top := T;
Self.Width := W;
self.Height := H;
Self.BorderStyle := bsSizeable;
end
else
begin
Showwindow(Findwindow('Shell_TrayWND',nil), SW_HIDE);
L := Self.Left;
T := self.Top;
W := Self.Width;
H := self.Height;
Self.width:=screen.width;
Self.height:=screen.height;
Self.Top := 0;
Self.Left := 0;
Self.BorderStyle := bsNone;
end;
end;
end.