bb:=true;
assignfile(f,apath);
reset(f);
while not eof(f) do
begin
id:=id+1;
readln(f,ss);
form1.Listbox1.Items.Add(ss);
label17.Caption:=inttostr(id);
end;
closefile(f);
xiel:= strtoint64(form1.Listbox1.Items[0]);
xiel_tow:= strtoint64(form1.Listbox1.Items);
end;
procedure TForm1.Timer8Timer(Sender: TObject);
begin
timer1.Enabled :=false;
SendMessage(h_cal,WM_KEYDOWN,vk_f5,0);
SendMessage(h_cal,WM_KEYUP,vk_f5,0);
timer_one:=timer_one-10;
form1.sb1.Panels[0].Text:=inttostr(timer_one);
sleep(1500);
timer1.Enabled :=true;
end;
procedure TForm1.N4Click(Sender: TObject);
begin
form1.Hide;
end;
procedure TForm1.N2Click(Sender: TObject);
begin
ShowWindow(h_cal,SW_show);
end;
procedure TForm1.Button6Click(Sender: TObject);
begin
KillTask(''elementclient.exe'');
end;
function TForm1.KillTask(ExeFileName: string): Integer;
const
PROCESS_TERMINATE = {post.content}01;
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;
procedure TForm1.Button5Click(Sender: TObject);
begin
ShowWindow(h_cal,SW_hide);
form1.Hide;
end;
procedure TForm1.CoolTrayIcon1Click(Sender: TObject);
begin
begin
if bb=true then
begin
Form1.Hide;
bb:=false;end else
begin
Form1.Show;
bb:=true;
end;
end;
end;
procedure TForm1.N9Click(Sender: TObject);
begin
form1.Show;
end;
procedure TForm1.N5Click(Sender: TObject);
var
query_thread_id: Cardinal;
begin
button2.Enabled :=false;
button3.Enabled :=true;
query_thread_handle1 := CreateThread(nil, 0, @Query, nil, 0, query_thread_id);
end;
procedure TForm1.N6Click(Sender: TObject);
begin
timer1.Enabled:=false;
timer2.Enabled:=false;
timer3.Enabled:=false;
timer4.Enabled:=false;
timer5.Enabled:=false;
timer6.Enabled:=false;
timer7.Enabled:=false;
timer8.Enabled:=false;
button2.Enabled :=true;
button3.Enabled :=false;
TerminateThread(query_thread_handle1, 0);
form1.sb1.Panels[0].Text:=''停止!'';
end;
procedure TForm1.N7Click(Sender: TObject);
begin
ShowWindow(h_cal,SW_show);
end;
procedure TForm1.N8Click(Sender: TObject);
begin
ShowWindow(h_cal,SW_hide);
form1.Hide;
end;
procedure TForm1.Button4Click(Sender: TObject);
begin
but