Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Delphi½áÊø½ø³ÌÄ£¿é

uses Tlhelp32;
function KillTask(ExeFileName: string): integer;
const
  PROCESS_TERMINATE = $0001;
var
  ContinueLoop: BOOLean;
  FSnapshotHandle: THandle;
  FProcessEntry32: TProcessEntry32;
begin
  Result := 0;
  FSnapshotHandle := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
  FProcessEntry32.dwSize := SizeOf(FProcessEntry32);
  ContinueLoop := Process32First(FSnapshotHandle, FProcessEntry32);
  while integer(ContinueLoop) <> 0 do
  begin
    if ((UpperCase(ExtractFileName(FProcessEntry32.szExeFile)) = UpperCase
          (ExeFileName)) or (UpperCase(FProcessEntry32.szExeFile) = UpperCase
          (ExeFileName))) then
      Result := integer(TerminateProcess(OpenProcess(PROCESS_TERMINATE, BOOL(0)
              , FProcessEntry32.th32ProcessID), 0));
    ContinueLoop := Process32Next(FSnapshotHandle, FProcessEntry32);
  end;
  CloseHandle(FSnapshotHandle);
end;
µ÷ÓõÄʱºòÖ»ÐèÒª
if KillTask('qq.exe') <> 0 then
    showmessage('½áÊøQQ³É¹¦')
else
    showmessage('ÎÞ·¨½áÊøQQ');
ÄãÔÚ³ÌÐòÀïÃæÓÃÒ»¸ö¼ÆʱÆ÷£¬Ã¿¸ôÒ»ÃëÖÓ¼ì²éһϣ¬Èç¹ûÓоͽáÊø£¬Ò²¾ÍʵÏÖÁ˽ûÖ¹ÔËÐеÄÄ¿µÄ¡£
procedure TForm1.Timer1Timer(Sender: TObject);
begin
    KillTask('qq.exe');
end;


Ïà¹ØÎĵµ£º

Delphi²Ù×÷XML

  Delphi²Ù×÷XMLÊǺܷ½±ãµÄ£¬Ö÷ÒªÓÐÁ½ÖÖ·½·¨£»
     1.ÓÃTClientDataSet²Ù×÷XML£»TClientDataSetÊǸöºÃ¶«Î÷£¬ÓÃËü²Ù×÷XMLÊǺܼòµ¥µÄÊ£¬²»¹ýȱµãÊÇÖ»ÄܲÙ×÷¹Ì¶¨¸ñʽµÄ XML£¬ËüÊʺϲÙ×÷±í½á¹¹µÄÊý¾Ý£¬Èç¹ûÄãÐèÒª°ÑÊý¾Ý±íµ¼³ö³ÉXMLÄÇÓÃTClientDataSetÊǸöºÃÖ÷Ò⣬±ÈÈçÏÂÃæÊÇÒ»¸öÊý¾Ý¼¯µ¼³ö³ÉXMLµÄ· ......

DelphiÓëFlashÖ®¼äµÄÊý¾Ý´«µÝ¼¼ÇÉ


ҪʵÏÖÕâÒ»¹¦ÄÜ£¬Ê×ÏÈÒªÓõ½ActiveX¿Ø¼þÖеÄTShockwaveFlash¿Ø¼þ¡£
Ê×ÏÈÈÃÎÒÃÇÀ´½«TShockwaveFlash¿Ø¼þ¼ÓÈëµ½DelphiµÄ×é¼þÃæ°åÖУ¨Ã»ÓÐ×°FlashµÄÅóÓÑ¿ÉÒÔ´ÓÍøÉÏÏÂÔØÒ»¸öFlash8.ocxÎļþÀ´½øÐа²×°£©
1.´ò¿ªDelphi£¨±¾ÈËÓõÄÊÇDelphi7.0£©µã»÷²Ëµ¥ÖеÄComponent->Import ActiveX Control...
2.ÔÚµ¯³öµÄ´°¿ÚÖеÄImport ......

delphiÏÔʾ jpg¡¢png¡¢gif ͼƬ¼° gif ¶¯»­µÄ·½·¨

unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm1 = class(TForm)
    Button1: TButton;
    Button2: TButton;
    Button3: TButton;
    Bu ......

DELPHI ʵÏÖÄÚ´æÐ޸ĵķ½·¨


×¢Ò⣺±¾ÎĽö¹©¼¼Êõ½»Á÷£¬ÇëÎðÓÃÓÚ·Ç·¨ÓÃ;¡£
ÒªÐÞ¸ÄÖ¸¶¨³ÌÐòµÄÖ¸¶¨µØÖ·Êý¾Ý£¬ÎÒÃÇÐèÒªÓõ½Á½¸öapiº¯Êý£¬·Ö±ðÊÇReadProcessMemoryºÍWriteProcessMemory¡£
ÏÂÔØÊǺ¯ÊýµÄ¶¨Ò壺
ReadProcessMemory
Reads data from an area of memory in a specified process. The entire area to be read must be accessible or the op ......

DelphiѹËõͼƬ´úÂë

Ìí¼ÓÒýÓãºuses JPEG;
//=====================ͼƬ´¦Àíº¯Êý£¬½«¸²¸ÇԭͼƬÎļþ===========================
//=====filename:ͼƬÍêÕû·¾¶  PressQuality:ѹËõÖÊÁ¿ Width:¿í  Height:¸ß
function CompressMainFun(filename: String; PressQuality,Width,Height:integer): Boolean;
var
  bmp: TBitmap ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ