tinti
asked on
text file
I have a combobox with some names
a button below
i want when i select a name from combo and push the button
to create me in C:\Temp a new empty text file with the name from the combo
ex if the selected name is John Mark create C:\Temp\John Mark.txt
Thanks
a button below
i want when i select a name from combo and push the button
to create me in C:\Temp a new empty text file with the name from the combo
ex if the selected name is John Mark create C:\Temp\John Mark.txt
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
//uupps add '.txt'
procedure TForm1.Button1Click(Sender : TObject);
var
FileHandle: Integer;
begin
FileHandle := FileCreate('c:\temp\'+comb obox1.text +'.txt');
if FileHandle<0 then showmessage('create file error')
end;
end.
procedure TForm1.Button1Click(Sender
var
FileHandle: Integer;
begin
FileHandle := FileCreate('c:\temp\'+comb
if FileHandle<0 then showmessage('create file error')
end;
end.
var
FileHandle: Integer;
begin
FileHandle := FileCreate('c:\temp\'+comb
if FileHandle<0 then showmessage('create file error')
end;