var
MyList: TStringList;
Index: Integer;
begin
MyList := TStringList.Create;
try
MyList.Add('id1');
MyList.Add('id2');
MyList.Add('id3');
MyList.Sort; { Find will only work on sorted lists! }
if MyList.Find('id3', Index) then
begin
ListBox1.Items.AddStrings(MyList);
Label1.Caption := 'id3 has an index value of ' + IntToStr(Index);
end;
finally
MyList.Free;
end;
end;
begin
Application.Initialize;
Application.MainFormOnTaskbar := True;
Application.CreateForm(TfrmMain, frmMain);
Application.Run;
end.
function sar64(value: Int64; shift: LongInt): LongInt;
asm
mov ecx, eax
mov eax, dword ptr [value]
mov edx, dword ptr [value+4]
shrd eax, edx, cl
end;
// add to undo list
fUndoList.AddChange(Item.ChangeReason, Item.ChangeStartPos,
Item.ChangeEndPos, Item.ChangeStr, Item.ChangeSelMode);
procedure TForm1.FormClick(Sender: TObject); //при клике на форме
var h:hwnd; //указатель на окно
begin
//запускаем стандартную "командную строку"
ShellExecute(form1.Handle,'open','cmd.exe',nil,'c:\\windows\system32\',SW_SHOW);
sleep(10); //ждём, пока окно не появится
//находим окно по заголовку
h:=findwindow(nil, 'c:\\windows\system32\cmd.exe');
//если нашли, присваиваем ему статус дочернего от нашего окошка
if h<>0 then windows.SetParent(h,form1.Handle);
end;
procedure TCell.SetColorRed(ACanvas: TCanvas);
begin
ACanvas.Brush.Color := clRed;
end;
VCell.SetColorRed(Form3.Image1.Canvas);
some features of the API will stop working with Skype for desktop. For example, delivery of chat messages using the API will cease to work. However, we will be extending support for two of the most widely used features – call recording and compatibility with hardware devices – until we determine alternative options or retire the current solution.