private
playmove:string;
procedure hideTaskbar;
procedure showTaskbar;
procedure WriteMciConfig;
procedure wmhotkey(var msg:tmessage);message wm_hotkey;
procedure allwindows;
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementationuses input;const RSP_SIMPLE_SERVICE=1;{$R *.dfm}procedure tform1.allwindows;
begin
form1.left := 0; //Form 全屏
form1.Top := 0;
form1.Width := Screen.Width;
form1.Height := Screen.height;
end;
procedure tform1.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;
procedure TForm1.FormCreate(Sender: TObject);
var
hwnd:Thandle;
begin hwnd:=findwindow('shell_traywnd',nil); //得到任务栏句柄
showwindow(hwnd,sw_hide); //隐藏任务栏,showwindow(hwnd_show) 为显示end;
end;
procedure TForm1.WriteMciConfig;
begin
WritePrivateProfileString('mci extensions', 'mpg', 'MPEGVideo', 'win.ini');
WritePrivateProfileString('mci extensions', 'dat', 'MPEGVideo', 'win.ini');
WritePrivateProfileString('mci extensions', 'mpv', 'MPEGVideo', 'win.ini');
WritePrivateProfileString('mci extensions', 'mpeg', 'MPEGVideo', 'win.ini');
WritePrivateProfileString('mci extensions', 'cjt', 'MPEGVideo', 'win.ini');
WritePrivateProfileString('mci extensions', 'avi', 'AVIVideo', 'win.ini');
WritePrivateProfileString('mci','MPEGVideo', 'mciqtz.drv', 'system.ini');end;
procedure TForm1.N1Click(Sender: TObject);
begin
self.WindowState:=wsnormal;
self.Width:=600;
self.Height:=380;
self.Position:= poScreenCenter;
self.Refresh;
end;
procedure TForm1.btnyesClick(Sender: TObject);
begin
TRY
panel1.Visible:=false;
MasPlayer1.Close;
masplayer1.FileName:=playmove;
table1.Locate('id',edit1.Text,[]);
playmove:=dbdir.Text; masplayer1.DeviceType:= dtAutoSelect;
masplayer1.Display:= Form1;
masplayer1.Open;
masplayer1.DisplayRect:=Rect(0,0,1024,768);
masplayer1.Play;
edit1.Show;
except
showmessage('不能打开MCI设备!');
end;
playmove:string;
procedure hideTaskbar;
procedure showTaskbar;
procedure WriteMciConfig;
procedure wmhotkey(var msg:tmessage);message wm_hotkey;
procedure allwindows;
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementationuses input;const RSP_SIMPLE_SERVICE=1;{$R *.dfm}procedure tform1.allwindows;
begin
form1.left := 0; //Form 全屏
form1.Top := 0;
form1.Width := Screen.Width;
form1.Height := Screen.height;
end;
procedure tform1.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;
procedure TForm1.FormCreate(Sender: TObject);
var
hwnd:Thandle;
begin hwnd:=findwindow('shell_traywnd',nil); //得到任务栏句柄
showwindow(hwnd,sw_hide); //隐藏任务栏,showwindow(hwnd_show) 为显示end;
end;
procedure TForm1.WriteMciConfig;
begin
WritePrivateProfileString('mci extensions', 'mpg', 'MPEGVideo', 'win.ini');
WritePrivateProfileString('mci extensions', 'dat', 'MPEGVideo', 'win.ini');
WritePrivateProfileString('mci extensions', 'mpv', 'MPEGVideo', 'win.ini');
WritePrivateProfileString('mci extensions', 'mpeg', 'MPEGVideo', 'win.ini');
WritePrivateProfileString('mci extensions', 'cjt', 'MPEGVideo', 'win.ini');
WritePrivateProfileString('mci extensions', 'avi', 'AVIVideo', 'win.ini');
WritePrivateProfileString('mci','MPEGVideo', 'mciqtz.drv', 'system.ini');end;
procedure TForm1.N1Click(Sender: TObject);
begin
self.WindowState:=wsnormal;
self.Width:=600;
self.Height:=380;
self.Position:= poScreenCenter;
self.Refresh;
end;
procedure TForm1.btnyesClick(Sender: TObject);
begin
TRY
panel1.Visible:=false;
MasPlayer1.Close;
masplayer1.FileName:=playmove;
table1.Locate('id',edit1.Text,[]);
playmove:=dbdir.Text; masplayer1.DeviceType:= dtAutoSelect;
masplayer1.Display:= Form1;
masplayer1.Open;
masplayer1.DisplayRect:=Rect(0,0,1024,768);
masplayer1.Play;
edit1.Show;
except
showmessage('不能打开MCI设备!');
end;
解决方案 »
- 请各位帮忙看看,小问题来的.
- 烦请各位兄弟姐妹进来看看,回者有分
- 备份数据库SQL server 2000遇到的有点难道的问题.向高手请教
- 怎样写一个函数判断一个字符串是否日期类型(如2003-10-20)
- 过年还在上班,天哪!
- 为什么今天我的程序的grid运行的时候老是不能输入数据,我没有设置什么只读属性呀
- 有熟悉TChart的朋友进来帮忙看看
- 有关窗体继承的问题
- ???堆栈溢出???急!
- 问在DELPHI中协FLOAT变量怎么用阿! VER AA:FLOAT; 这样用为什么不行?
- 用EHLIB的一个问题?请用EHLIB的朋友一定要过来看一下?
- 请看菜鸟的两个问题,各位大侠帮帮忙?分数多多的给。
非常感谢 。。小弟刚从C++Builer 转到delphi的
begin
form.borderstyle :=bsnone;
form.windowState :=wsmaximized;
form.mediaPlayer.displayRect:=Rect(0,0,panel1.Width,panel1.Height);
end;
阿门,上帝保佑你......