Una mejor forma y más sencilla es:
Código Delphi
[-]
uses
StrUtils;
procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
if (Edit1.SelStart = 0) or (Edit1.Text[ Edit1.SelStart ] in WordDelimiters) then Key := UpCase(Key);
end;
WordDelimiters es una constante definida en StrUtils y contiene no sólo espacios sino otros caracteres que funcionan como separadores de palabras. De esta forma el código también funcionará al ingresar comas, puntos, etc. y no sólo espacios.
Otra versión más completa del código anterior, que revisa si se insertó un espacio en el texto y cambia la siguiente a mayúsculas es:
Código Delphi
[-]
uses
StrUtils;
procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
var
S: string;
ss: Integer;
begin
if (Edit1.SelStart = 0) or (Edit1.Text[ Edit1.SelStart ] in WordDelimiters) then Key := UpCase(Key);
if ((Length(Edit1.Text)>Edit1.SelStart) and (Key in WordDelimiters)) then begin
S := Edit1.Text; S[ Edit1.SelStart + 1] := UpCase(S[ Edit1.SelStart + 1 ]); ss := Edit1.SelStart; Edit1.Text := S; Edit1.SelStart := ss end
end;