Добрый день.
Подскажите, как подсчитать количество отмеченных строк в CheckListBox? Необходимо сделать подсчет и вывести это значение в Gauge.MaxValue (компонент из AlphaSkins).
Код такой:
Код:
for i := 0 to MainForm.asCheckListBox.Items.Count - 1 do
begin
if MainForm.asCheckListBox.Checked[i] then
begin
Ident := sl[i];
Value := InstallINI.ReadString(PChar('All'), Ident, '');
...
MainForm.asInstGauge.MaxValue := ?;
...
if CreateProcess(PChar(ExePath), PChar(CmdLine), nil, nil, False, 0, nil, nil, SI, PI) then
try
while True do
begin
if (WaitForSingleObject(PI.hProcess, 100) <> WAIT_TIMEOUT) then Break;
end;
finally
MainForm.asInstGauge.Progress := ?;
Application.ProcessMessages;
CloseHandle(PI.hProcess);
CloseHandle(PI.hThread);
end;
end;
end;
То есть с каждым выполненным CreateProcess, Gauge по задумке должен отображать ход выполнения.