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
Ïà¹ØÎĵµ£º
Ê×ÏÈÓÃNotepad»òResource workshop 4.5½¨Á¢RCÎļþ¡£ ½á¹¹ÈçÏ /****************************************************************************
rcdemo.rc
produced by Borland Resource Workshop
*****************************************************************************/
# ......
¹«Ë¾µÄ²ÍÒûϵͳ³öÆ·µÄÖú¼ÇÂ룬»¹Ã»ÊµÏÖ×Ô¶¯´Ó³öÆ·Ãû³Æ»ñÈ¡ºº×ÖÆ´ÒôÊ××Öĸ¡£
ËùÒÔÔÚÍøÉÏÕÒÁËÈýÖÖ½â¾ö·½·¨£¬
Ò»ÖÖÊÇkaguo µÄʹÓó£Óúº×ÖÆ´Òô²éÕÒ·½·¨£¬ÕâÖÖ´úÂëÊ®·Ö¼òµ¥£¬ÊµÏÖ·½±ã£¬µ«ÊÇÕâÖÖ´úÂë½ö½öÊÇÒ»¼¶×ֿ⣬ֻ֧³ÖÈýǧÁ㼸¸ö×ֵġ£
//»ñÈ¡ÖÐÎÄ×Ö´®µÄÉùĸµ ......
uses WinInet;
procedure TForm1.Button1Click(Sender: TObject);
begin
if InternetGetConnectedState(nil, 0) then
ShowMessage('ÒÑÁ¬½Ó')
else
ShowMessage('ÒѶϿª');
end; ......
ÔÚȺÀï¿´µ½ÓÐÈË·¢Á˸ö±ðÈË·¢¸øËûµÄ
ÎÒ¿´ÁËдµÄ±È½ÏÉú¶¯ ÔÚÕâת¸ø´ó¼Ò¿´¿´
ºÃµÄ Ê°È¡ÎïÌ庯ÊýдºÃÁË Ï²½ÊÇÈçºÎ½«´úÂë×¢Èëµ½ÓÎÏ·½ø³ÌÖÐÖ´ÐÐ??
1) С͵¿ªÃÅ
PHND:= OpenProcess (PROCESS_ALL_ACCESS, False, PID);µÃµ½ÓÎÏ·´°¿Ú¾ä±ú»ñµÃȨÏÞ
2)С͵ÔÚ·¿¼ä¸ã¸ö·Å×÷°¸·½°¸µÄµØ·½
TAdd := VirtualAllocEx(PHND, nil, 4096, ......
ÓÐʱºòÎÒÃÇÐèÒª¿ÉÒÔ¸ßËÙ¼ìË÷µÄÁÐ±í£¬×ÔÈ»»áÏëµ½¹þÏ£±í£¬Æ½Ê±ÎÒÃÇ¿ÉÄÜÏëµ½ÓÃIniFilesµ¥ÔªÀïµÄTHashedStringList£¬µ« THashedStringListÿ´ÎÐÂÔöÒ»¸öItemºó¶¼ÐèҪˢÐÂÒ»±é£¬Êý¾Ý¶àÁË¿ÉÄÜ»áÓеãÂý£¬¸Ð¾õ²»Ì«ºÃ£¬¶øTStringHashÔòÖ»ÄÜ´æ IntegerÐ͵Ä(ËäÈ»ÎÒÃÇ¿ÉÒ԰ѱðµÄ¶«Î÷Ç¿ÖÆת³ÉÕûÐÍ´æ½øÈ¥£¬µ«¸Ð¾õ²»Ì«ºÃ)¡£TStringHashÒÑ¾Ê ......