Delphi²¥·ÅGifºÍFlash¶¯»µÄ·½·¨
ÏÔʾһ¸öGIF¶¯»
procedure ShowGIF( GIFFileName : String );
var TargetFrameName,PostData,Heads,Flags : OleVariant; URL : widestring; begin TargetFrameName := '';{Ö¸¶¨FrameµÄ¿Õ×Ö·û´®Ê±,ÔòÔÚµ±Ç°FrameÖдò¿ª¶¯»Îļþ} PostData := false;{²»·¢ËÍÊý¾Ý} Heads := '';{HeaderÐÅϢΪ¿Õ} Flags := 0;{FlagsÉèΪ0} URL := GIFFileName; with formGIF.webbrowser do{ÔÚÖ¸¶¨´°¿ÚÖеÄIEä¯ÀÀÆ÷¿Ø¼þÖÐÏÔʾ¶¯»} begin navigate(URL,Flags,TargetFrameName,PostData,Heads);{ÏÔʾ¶¯»Îļþ} end; end;
²¥·ÅFlash ¡¡¡¡
Ê×ÏÈ£¬ÄãµÄ»úÆ÷ÀïҪװÓÐ Flash ²¥·ÅÈí¼þ£¨ÄãµÄ IE ÄÜÏÔʾ Flash £©¡£IE Ö®ËùÒÔÄÜÏÔʾ Flash ÊÇ°²×°ÁËÓÉ Macromedia ¹«Ë¾ÌṩµÄ swflash.ocx ¿Ø¼þ£¬ÎÒÃÇ¿ÉÒÔÔÚWin98 µÄ $Windows\System\Macromed\Flash ÖлòÔÚ Win2000 ÖÐµÄ $Winnt\System32\ Macromed\Flash ÖÐÕÒµ½Ëü¡£ActiveX ¿Ø¼þÔÚ Windows ÀïÊÇͨÓõģ¬DelphiҲͬÑùÖ§³Ö¡£
¡¡¡¡ÔËÐÐ Delphi ºó£¬Ñ¡ÔñÑ¡µ¥Component→Import ActiveX Control£¬ÕÒµ½SWFlash.OCX Îļþ½øÐа²×°¡£°²×°Íê³Éºó£¬ActiveX Ãæ°åÀï³öÏÖ TShockwaveFlash¿Ø¼þ£¬ÕâÊÇDelphi¶ÔSWFlash.OCX µÄ·â×°£¬ÏÖÔÚÎÒÃǾͿÉÒÔÓÃÕâ¸ö¿Ø¼þÀ´²¥·Å Flash ÁË¡£ÍÏÒ»¸ö Flash ¹ýÀ´£¬·ÅÔÚ Form ÉÏ£¬Ö¸¶¨Æä Movie ÊôÐÔΪ d:\test.SWF£¬²¢°´ F9 ¼ü¼ÓÒÔÔËÐм´¿É¡£ÔõôÑù£¬ÔËÐÐЧ¹û²»´í°É£¿
¡¡¡¡ÏÂÃ棬±ÊÕß½«¾ßÌå½éÉÜTShockwaveFlashÖ÷ÒªÊôÐÔ¡¢·½·¨ºÍʼþ£¬ÒÔ±ãÓÚ¶ÁÕß¿ª·¢¡£
TShockwaveFlashÖ÷ÒªÊôÐÔÈçÏ£º
ReadyState£º¶ÁÒ»¸öflashÎļþʱµÄ״̬£¬ÆäÖаüÀ¨0=Loading¡¢1=Uninitialized¡¢2=Loaded¡¢ 3=InteractiveºÍ4=Complete£» TotalFrames£º×ÜÖ¡Êý£¬Ö»Óе±ReadyState = 4ʱ²ÅÄÜ·ÃÎʸÃÊôÐÔ£» FrameNum£ºµ±Ç°²¥·ÅµÄÖ¡£» Playing£º²¥·Å»òÔÝÍ£Ò»¸öflash£» Quality£ºÖ¸¶¨µ±Ç°äÖȾµÄÖÊÁ¿£¬°üÀ¨0=Low, 1=High¡¢2=AutoLow¡¢3=AutoHigh£» ScaleMode£ºËõ·Åģʽ£¬0=ShowAll¡¢1= NoBorder¡¢2 = ExactFit£» AlignMode£º¶ÔÆëģʽ£¬Left=+1¡¢Right=+2¡¢Top=+4¡¢Bottom=+8£» BackgroundColor£º±³¾°É«£¬-1ΪĬÈÏÑÕÉ«£» Loop£ºÊÇ·ñÑ»·£» Movie£ºÖ¸¶¨²¥·ÅµÄflashÎļþ·¾¶£¬¿ÉÒÔΪһ¸öURL¡£
TShockwaveFlashÖ÷Òª·½·¨ÈçÏ£º
Play()£º¿ªÊ¼²¥·Å¶¯»£» Stop()£»Í£Ö¹²¥·Å¶¯»£» Back()£»²¥·ÅÇ°Ò»Ö¡¶¯»£» Forward()£º²¥·ÅºóÒ»Ö¡¶¯»£» Rewind()£º²¥·ÅµÚÒ»Ö¡¶¯»£» SetZoomRect(int left, int top, int right, int bottom)£ºÉèÖÃËõ·ÅµÄÇøÓò£» Zoom(int
Ïà¹ØÎĵµ£º
º¯ÊýÒ»£º
view plaincopy to clipboardprint?
uses
Windows,
SysUtils,
Classes,
ShellAPI;
function RunAndWait(FileName: string; Visibility: Integer): THandle;&nbs ......
¹«Ë¾µÄ²ÍÒûϵͳ³öÆ·µÄÖú¼ÇÂ룬»¹Ã»ÊµÏÖ×Ô¶¯´Ó³öÆ·Ãû³Æ»ñÈ¡ºº×ÖÆ´ÒôÊ××Öĸ¡£
ËùÒÔÔÚÍøÉÏÕÒÁËÈýÖÖ½â¾ö·½·¨£¬
Ò»ÖÖÊÇkaguo µÄʹÓó£Óúº×ÖÆ´Òô²éÕÒ·½·¨£¬ÕâÖÖ´úÂëÊ®·Ö¼òµ¥£¬ÊµÏÖ·½±ã£¬µ«ÊÇÕâÖÖ´úÂë½ö½öÊÇÒ»¼¶×ֿ⣬ֻ֧³ÖÈýǧÁ㼸¸ö×ֵġ£
//»ñÈ¡ÖÐÎÄ×Ö´®µÄÉùĸµ ......
Ê×ÏÈ£¬ ÎÒµÄFF°æ±¾ÊÇ3.0.16µÄ£¬´Ó¹ÙÍø£¨http://get.adobe.com/flashplayer/£©ÉÏÏÂÔØ.tar.gz°üºó¡£¡£½âѹ³öÀïÃæµÄÒ»¸ö£ª.soÎļþ
¼þÖ®ºó£¬°Ñ¸ÃÎļþ¸´ÖƵ½/usr/lib/mozillia/pluginsÏ£¬ÖØÆôff¾ÍOKÁË¡£
£¨ÒÔÉÏ·½·¨½ö¹©²Î¿¼£¬ÖÁÉÙÎÒÊÇÕâÑù×öµÄ£¬²¢Çҳɹ¦ÁË£¬£© ......
interface
uses Windows, Messages, SysUtils, Classes, Graphics, Controls,
Forms, Dialogs, ExtCtrls, StdCtrls, Buttons;
type
TDemoForm = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
GetButton: TBitBtn;
CloseButton: TBitBtn;
Bevel1: TBevel;
Label5: TLabel;
......
flashÊÇmacromedia¹«Ë¾³öÆ·µÄ£¬ÓÃÔÚ»¥ÁªÍøÉ϶¯Ì¬µÄ¡¢¿É»¥¶¯µÄshockwave¡£ËüµÄÓŵãÊÇÌå»ýС£¬¿É±ßÏÂÔر߲¥·Å£¬ÕâÑù¾Í±ÜÃâÁËÓû§³¤Ê±¼äµÄµÈ´ý¡£
flash¿ÉÒÔÓÃÆäÉú³É¶¯»£¬»¹¿ÉÔÚÍøÒ³ÖмÓÈëÉùÒô¡£ÕâÑùÄã¾ÍÄÜÉú³É¶àýÌåµÄͼÐκͽçÃ棬¶øʹÎļþµÄÌå»ýÈ´ºÜС¡£
flashËäÈ»²»¿ÉÒÔÏóÒ»ÃÅÓïÑÔ ......