delphi spirit, forever

Archive for the ‘delphi tips’ Category

I found from here, it’s nice for firefox and delphi fans. By the emamlpe, we can build new web browser by firefox core.
Would you like to display HTML in your applications using an open source solution? The Gecko Runtime Environment by the Mozilla Foundation can be embedded in a Delphi application by using the Mozilla [...]

This solution is from delphi3000.com,
Updated on 2000-12-06 due to Phil’s and Sven’s comments.
Updated on 2002-06-13 due to Carlos’ comment.
Thanks for improving!

function IsValidEmail(const Value: string): boolean;
 
function CheckAllowed(const s: string): boolean;
var
i: integer;
begin
Result:= false;
for i:= 1 to Length(s) do
begin
// illegal char in s -> no valid address
if not (s[i] in [’a’..’z',’A’..’Z',’0′..’9′,’_',’-',’.']) then
Exit;
end;
Result:= true;
end;
 
var
i: integer;
namePart, serverPart: string;
begin // of [...]

Tags:

10 Nov, 2008

Useful note of TStringList

Posted by: admin In: delphi tips

I think tstringlist is delphi a great invention can be programmed in time to save a lot of time. Following on from here to introduce the Tstringlist.
TStringList is a utility class type. It is extremely useful for many kinds of list processing. Items in a string list may be inserted, moved and sorted.
The list can [...]

09 Nov, 2008

How do you parser CSV file use delphi

Posted by: admin In: delphi tips

The wpsCsvParser has been updated to support parsing Tab Separated Value files. You can specify the value separator type by setting the new ValueSeparatorType property to either vsCsv or vsTab. Or you can set the ValueSeparator property to any character you wish to use as the separator. The default is vsCsv for CSV parsing. From [...]

Tags: