VideoFrm.pas
上传用户:hylc_2004
上传日期:2014-01-23
资源大小:46800k
文件大小:2k
- unit VideoFrm;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, ExtCtrls,ChatingFrm,Global, Menus,RealMessengerUnit;
- type
- TVideoForm = class(TForm)
- procedure FormCreate(Sender: TObject);
- procedure FormClose(Sender: TObject; var Action: TCloseAction);
- procedure FormShow(Sender: TObject);
- private
- { Private declarations }
- public
- ChatingForm:TChatingForm;
- VideoHandShake:TVideoHandShake;
- end;
- var
- VideoForm: TVideoForm;
- implementation
- {$R *.dfm}
- procedure TVideoForm.FormCreate(Sender: TObject);
- begin
- DoubleBuffered:=True;
- end;
- procedure TVideoForm.FormClose(Sender: TObject; var Action: TCloseAction);
- begin
- if PEmployee(ChatingForm.TVUserList.Items.GetFirstNode.Data).HaveVideoDevice then
- begin
- if (ChatingForm.Width-ChatingForm.PnlLeftTop.Width<ChatingForm.PnlYourCamera.Width) then ChatingForm.PnlLeftTop.Width:=ChatingForm.PnlLeftTop.Width - ChatingForm.PnlYourCamera.Width - 2;
- ChatingForm.PnlYourCamera.Show;
- end;
- Action:=caFree;
- if VideoHandShake<>nil then VideoHandShake.PDC:=GetDC(ChatingForm.AviPanelOut.Handle);
- SetStretchBltMode(VideoHandShake.PDC,HALFTONE);
- VideoForm:=nil;
- end;
- procedure TVideoForm.FormShow(Sender: TObject);
- begin
- if PEmployee(ChatingForm.TVUserList.Items.GetFirstNode.Data).HaveVideoDevice then
- begin
- if (ChatingForm.Width-ChatingForm.PnlLeftTop.Width>ChatingForm.PnlYourCamera.Width) then ChatingForm.PnlLeftTop.Width:=ChatingForm.PnlLeftTop.Width + ChatingForm.PnlYourCamera.Width + 2;
- ChatingForm.PnlYourCamera.Hide;
- end;
- end;
- end.