انشاء تطبيق منفصل exe
#3
و عليكم السلام و رحمة الله
لم أفهم سؤالك جيدا أخي لكن جرب هذا
كود :
procedure KillProcess(hWindowHandle: HWND); var hprocessID: INTEGER; processHandle: THandle; DWResult: DWORD; begin SendMessageTimeout(hWindowHandle, WM_CLOSE, 0, 0, SMTO_ABORTIFHUNG or SMTO_NORMAL, 5000, DWResult); if isWindow(hWindowHandle) then begin { Get the process identifier for the window} GetWindowThreadProcessID(hWindowHandle, @hprocessID); if hprocessID <> 0 then begin { Get the process handle } processHandle := OpenProcess(PROCESS_TERMINATE or PROCESS_QUERY_INFORMATION, False, hprocessID); if processHandle <> 0 then begin { Terminate the process } TerminateProcess(processHandle, 0); CloseHandle(ProcessHandle); end; end; end; end;

كود :
procedure TForm1.Button1Click(Sender: TObject); begin KillProcess(FindWindow('notepad',nil)); end;
الرد


الردود في هذا الموضوع
انشاء تطبيق منفصل exe - بواسطة King SofT - 16-06-2011, 09:13 PM
انشاء تطبيق منفصل exe - بواسطة youcef91 - 16-06-2011, 09:30 PM
انشاء تطبيق منفصل exe - بواسطة paix144 - 17-06-2011, 12:14 AM
انشاء تطبيق منفصل exe - بواسطة King SofT - 17-06-2011, 12:32 AM
انشاء تطبيق منفصل exe - بواسطة kachwahed - 17-06-2011, 05:33 AM
انشاء تطبيق منفصل exe - بواسطة King SofT - 17-06-2011, 09:42 AM
انشاء تطبيق منفصل exe - بواسطة gladiator16 - 17-06-2011, 09:52 AM
انشاء تطبيق منفصل exe - بواسطة kachwahed - 17-06-2011, 02:51 PM
انشاء تطبيق منفصل exe - بواسطة King SofT - 18-06-2011, 05:03 PM
انشاء تطبيق منفصل exe - بواسطة kachwahed - 18-06-2011, 05:52 PM

التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم