Search Results

Showing results 1 to 36 of 36
Search took 0.01 seconds.
Search: Posts Made By: pritaeas ; Forum: Pascal and Delphi and child forums
Forum: Pascal and Delphi Oct 19th, 2009
Replies: 1
Views: 434
Posted By pritaeas
For an empty line you can use Memo1.Lines.Add('').

Line 3 and 4 should use this method too, because they are strings. Lines 1 and 2 add a TStrings object (a collection of strings).
Forum: Pascal and Delphi Oct 19th, 2009
Replies: 2
Views: 675
Posted By pritaeas
li.Tag perhaps. Not a very nice solution, but it works.
Forum: Pascal and Delphi Oct 12th, 2009
Replies: 4
Views: 454
Posted By pritaeas
Try it on paper. Write the values down. Then change them as you walk through each loop (in your head).
Forum: Pascal and Delphi Oct 12th, 2009
Replies: 4
Views: 454
Posted By pritaeas
The way I read this, is that you need to calculate the value of the variable (evens). Just follow the source code in your head, or on paper, and do as it instructs.

I don't see output in the...
Forum: Pascal and Delphi Sep 18th, 2009
Replies: 4
Views: 429
Posted By pritaeas
I think Length(XMLHTTP.ResponseBody) should do the trick.
Forum: Pascal and Delphi Sep 18th, 2009
Replies: 4
Views: 429
Posted By pritaeas
You can use MyFileStream.Write(); Please look in the help for parameter info. I think the first can be a string, and the second the length. If you want to write ResponseStream, there might be some...
Forum: Pascal and Delphi Sep 17th, 2009
Replies: 5
Views: 602
Posted By pritaeas
Is it required to see those lines as they are generated. If you could send them to a file, you can speed it up. The memo is really awful for this amount of data.

Also, the processmessages slows...
Forum: Pascal and Delphi Sep 16th, 2009
Replies: 3
Views: 505
Posted By pritaeas
See the helpfile for the function Pos(). It will allow you to search for a substring.
Forum: Pascal and Delphi Aug 3rd, 2009
Replies: 12
Views: 913
Posted By pritaeas
Correct. Labels must start with a character, not a number. Add a prefix to the 200, like:

label200:

and change the references in the code.
Forum: Pascal and Delphi Aug 3rd, 2009
Replies: 12
Views: 913
Posted By pritaeas
end . should be end. (remove the space)

Not sure about the first error. Could it be triggered by the $N switch error ? Look for {$N} and remove it (at the top).
Forum: Pascal and Delphi Aug 2nd, 2009
Replies: 8
Views: 711
Posted By pritaeas
I wonder, High and Low return the highest and lowest array index iirc. Isn't he looking for Min and Max ?
Forum: Pascal and Delphi Jul 10th, 2009
Replies: 5
Views: 497
Posted By pritaeas
This works for me:

if screen.fonts.IndexOf('Arial') > -1 then
MessageDlg('Arial installed', mtInformation, [mbok], 0);
Forum: Pascal and Delphi Mar 24th, 2009
Replies: 3
Views: 370
Posted By pritaeas
var
sl: TStringList;
begin
sl := TStringList.Create;
sl.LoadFromFile(yourtextfilehere.txt);
ShowMessage(sl[Random(sl.Count)]);
sl.Free;
end;
Forum: Pascal and Delphi Mar 24th, 2009
Replies: 3
Views: 370
Posted By pritaeas
If you load your strings into a tstringlist, then you can use the random function to select a random line.
Forum: Pascal and Delphi Mar 24th, 2009
Replies: 3
Views: 477
Posted By pritaeas
Show what you have so far.
Forum: Pascal and Delphi Mar 24th, 2009
Replies: 8
Views: 395
Posted By pritaeas
What do you have so far ?
Forum: Pascal and Delphi Mar 13th, 2009
Replies: 10
Views: 1,332
Posted By pritaeas
Ofcourse. Just declare one integer, call randomize and then random.
Forum: Pascal and Delphi Mar 13th, 2009
Replies: 10
Views: 1,332
Posted By pritaeas
const
myarray: array [0..9] of Integer = (10, 20, 30, 40, 50, 60, 70, 80, 90, 100);
begin
Randomize;
Writeln(myarray[Random(10)]);
end;
Forum: Pascal and Delphi Mar 1st, 2009
Replies: 10
Views: 915
Posted By pritaeas
What have you got so far ? A normal windows application or a console application ?

If you have the former, then you can put a label, button and editbox on a form and start from there.
Forum: Pascal and Delphi Feb 28th, 2009
Replies: 10
Views: 915
Posted By pritaeas
What is the problem ? The pseudo code is as it should be. You only have to replace it with actual statements.
Forum: Pascal and Delphi Feb 28th, 2009
Replies: 2
Views: 467
Posted By pritaeas
An old fashioned .com file that executes ? How would you want to modify that ?
Forum: Pascal and Delphi Feb 2nd, 2009
Replies: 2
Views: 1,017
Posted By pritaeas
http://delphi.about.com/od/beginners/a/delphi_set_type.htm
Forum: Pascal and Delphi Dec 30th, 2008
Replies: 10
Views: 1,144
Posted By pritaeas
Remove all your *.~* and *.dcu files and any other files that will be regenerated and try to build from scratch
Forum: Pascal and Delphi Oct 15th, 2008
Replies: 2
Views: 856
Posted By pritaeas
This works in Delphi 5 on XP, so it should work for you:


var
SteamString : String;
CommunityString : String;
ZeroOrOne : String;
SteamId : String;
CommunityStringMath : Int64;
...
Forum: Pascal and Delphi Oct 13th, 2008
Replies: 7
Views: 1,045
Posted By pritaeas
LOL. I did too earlier, but he didn't seem to pick that up... ;D
Forum: Pascal and Delphi Oct 13th, 2008
Replies: 7
Views: 1,045
Posted By pritaeas
In addition to LizR

This:

BlockRead(ReadBIP,RecTile,SizeOf(recTile)+1,iRead);

Should be this:

BlockRead(ReadBIP,RecTile,1,iRead);
Forum: Pascal and Delphi Oct 10th, 2008
Replies: 7
Views: 1,045
Posted By pritaeas
Shouldn't you be using iCount instead of SizeOf(recTile) in the BlockRead ?
Forum: Pascal and Delphi Oct 9th, 2008
Replies: 6
Views: 1,526
Posted By pritaeas
Absolutely agree. It was just an answer to his question, although I'd do it your way too.
Forum: Pascal and Delphi Oct 8th, 2008
Replies: 6
Views: 1,526
Posted By pritaeas
Iirc, you should be able to use move().
Forum: Pascal and Delphi Oct 2nd, 2008
Replies: 2
Views: 1,742
Posted By pritaeas
You can use URLDownloadToFile() in the unit UrlMon.
Forum: Pascal and Delphi Sep 26th, 2008
Replies: 2
Solved: File of *Type*
Views: 1,098
Posted By pritaeas
The string (Directory) in the record is causing your problem. You'll need to change it to e.g. string[30]. string may not appear in a typed file, since it's length is undetermined.
Forum: Pascal and Delphi Sep 18th, 2008
Replies: 3
Views: 2,586
Posted By pritaeas
Are you looking for Delay() ?
Forum: Pascal and Delphi Sep 8th, 2008
Replies: 1
Views: 841
Posted By pritaeas
You would probably have to implement the OnDrawItem to draw it in an unusual way.
Forum: Pascal and Delphi Aug 5th, 2008
Replies: 7
Views: 1,115
Posted By pritaeas
In the OnClick event there's Sender. That refers to the clicked button, so you can use


TButton(Self).Color := clYellow;
Forum: Pascal and Delphi Jul 28th, 2006
Replies: 6
Views: 2,983
Posted By pritaeas
With the debugger you can view your code as it executes line by line, to see where it goes wrong. Be sure to do that, and you will find the problem. Probably some variables do not have the expected...
Forum: Pascal and Delphi Jul 25th, 2006
Replies: 6
Views: 2,983
Posted By pritaeas
Did you use the debugger, to see what happens when the code gets executed?

Hans
Showing results 1 to 36 of 36

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC