我是这样解决的,form1(主窗体)是form2上的mediaplayer的display属性
效果还可以,老兄不妨一试
procedure TForm2.Button5Click(Sender: TObject);
begin
hideTaskbar;
form1.Left:=0;
form1.Top:=-17;
form1.Clientwidth:=Screen.Width;
form1.ClientHeight:=Screen.Height;
form1.Invalidate;
Player.DisplayRect:=form1.ClientRect;
end;
//----------------------------------------
procedure TForm2.hideTaskbar;
//隐藏
var
wndHandle : THandle;
wndClass : array[0..50] of Char;
begin
StrPCopy(@wndClass[0], 'Shell_TrayWnd');
wndHandle := FindWindow(@wndClass[0], nil);
ShowWindow(wndHandle, SW_HIDE);
end;
恢复视窗时再调用下列过程
procedure TForm1.showTaskbar;
var
wndHandle : THandle;
wndClass : array[0..50] of Char;
begin
StrPCopy(@wndClass[0], 'Shell_TrayWnd');
wndHandle := FindWindow(@wndClass[0], nil);
ShowWindow(wndHandle, SW_RESTORE);
end;