Dear All,

How do I display the pathname to the BASH shell of the Linux Terminal?

Cheers,

Hi,

Are there any web version of Delphi? It is because I cannot install the Delphi from my portable harddrive to the public computers.

Cheers,

Dear All,

Could you tell me what is / are wrong of the coding?

Cheers,

Dear Sir,

Thank you for your kind help and I have a new question. I have followed the demo to do the same thing but it does not work.

Please help me to have a look.

Cheers,

[QUOTE=finalist;1145157]Below is an example ProjectSum about For loop using Edits and Labels:[/QUOTE]

Thank you for your help at the last time. I have tried to re-do the question by myself. Could you tell me what is wrong or missing for the attached document?

Cheers,

[QUOTE=finalist;1144765]Your project works fine after I did remove a line from [B]TonyProject1.dpr[/B][/QUOTE]

Thank you for your kind reply but could you tell me how can I change to For Loop?

Cheers,

[QUOTE=finalist;1143426][B]turbomen[/B],
Could you explain, why in your [U]Example3.zip[/U] the method [B][I]procedure TForm1.Button1Click(Sender: TObject);[/I][/B] is not assigned with the Event of [U]Button1[/U] [B][I]OnClick[/I][/B] ?
This is the reason your example does not work at all ....
I did upload here my example which works fine some days ago ....
May be you did not try it ?
Gud luck :!:[/QUOTE]

Dear Sir,

How can I use a For loop and a TImage components to produce the animation?

I need your help,

Cheers,

Sorry Sir,

The result is the same. It does not help.

Cheers,

[QUOTE=FlamingClaw;1140358]I hope this helps[/QUOTE]

Hi,

I found that Delphi6 is not suitable to work on these exercises. Could you tell me what software(s) is / are suitable?

Cheers,

Hi FlamingClaw,

Long time no see, how are you?

Thank you for your help but it does not work as well.

Cheers,

[QUOTE=PatrickSharp;1140031]Is there a specific problem that you are running into? The code works just fine with Lazarus and Delphi both.[/QUOTE]

Sorry,

I forget to attach the document.

Cheers,

Dear All,

Could you tell me what is wrong or missing for my coding?

Cheers,

[CODE]
unit Example3;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;

type
TForm1 = class(TForm)
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Edit5: TEdit;
Button1: TButton;
Button2: TButton;
Edit6: TEdit;
Edit7: TEdit;
Label1: TLabel;
Label2: TLabel;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
sum, average: integer;
begin
sum:=StrToInt(Edit1.Text)+StrToInt(Edit2.Text)+StrToInt(Edit3.Text)+StrToInt(Edit4.Text)+StrToInt(Edit5.Text);
average:=sum div 5;
Edit6.Text:=IntToStr(sum);
Edit7.Text:=IntToStr(average);
end;

end.
[/CODE]

Hi,

Thank you for your kind reply and help. But could you mind tell me why I cannot put 'for count := 1 to 10 do' to the program?

Cheers,

[QUOTE=finalist;1138841][CODE]unit Unit2;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls;

type
TForm2 = class(TForm)
Button1: TButton;
Image1: TImage;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form2: TForm2;

implementation

{$R *.dfm}

procedure TForm2.Button1Click(Sender: TObject);
var
count: integer;
begin
for count := 1 to 10 do
begin
Image1.Picture.LoadFromFile('T'+ IntToStr(count)+'.bmp');
sleep(100);
update;
end;
end;

end.[/CODE][/QUOTE]

Dear All,

Could you tell me how to do for it? One of the zip is the demo2.zip and the other is my work.

Please give me some of the ideas.

Cheers,

Dear All,

Please let me know what is wrong or missing for it from the attached document. One of them is my work (T9.zip) and the other is the demo

Cheers,

[QUOTE=turbomen;1134123]Hi,

Thank you for your kind help but the screen is total different between Delphi6 and Delphi IDE.

Cheers,

turbomen[/QUOTE]

Hi,

I have tried to open my classwork at my computer but I do not know why I cannot change the size of the image and many of the things.

Please give me some of the ideas to do it.

Cheers,

turbomen

Hi,

Thank you for your kind help but the screen is total different between Delphi6 and Delphi IDE.

Cheers,

turbomen

[QUOTE=finalist;1133920]Hi,
I could tell you how to start to VCL Forms Application using Delphi7:

You have to use menu:

  • File
    • New
    • Application

Delphi will open a new [B]Unit1.pas[/B] and a new [B]Form1[/B] ....
Unit1 will contain all the methods about Form1.
You may drop VCL-components from the palette of Delphi into Form1 as Buttons, Memos, StringGrids and so on....
After that you may develop your application by programming Events of above Components as:
[CODE]procedure TForm1.Button1Click(Sender: TObject);
begin
//.............
end;
[/CODE]
....[/QUOTE]

Dear ALL,

Hi. Long time no see. How are you? I have come back to Programming class already.

Could you tell me how can I start to VCL Forms Application if I use Delphi6?

Cheers,

turbomen

Thank you for your kind reply.

The restore kit is inside the harddrive but it does not go to the screen of Window. After discussing with the support from American Region. She advise me to buy back the restore CD from New Zealand / Australian Region. I have tried to call the 0800 phone on yesterday but it does not work because I am not in New Zealand now. When I tried to call the support of Australia. She is on a holiday in this moment until 7 January.

So, what can I do in this moment. Have you got the restore CD?

Cheers,

turbomen

Dear ALL,

I have bought a PC COMPAQ CQ2000AN in New Zealand. That model does not provided the restore kit in CD formation. I know the restore kit which is installed into the harddrive but now the PC was not work and cannot go to the windows screen and DOS prompt.

I have tried to call the support of HP at Australia but she is on a holiday until 7th January, 2010.

Could you tell me what I can do to solve the problem? I am not in New Zealand.

Please help

turbomen

Thank you for your prompt reply. Yes, I want to calculate the value of the variable (evens). Just follow the source code in my head, or on paper. But how can I do in this way?

Maybe, it is not useful for me to work on the computer for this kind of question.

It is the attached document.

Dear ALL,

Could you tell me how can I do this kind of question if I do not working with the computer and please find the attached document for your reference - it is the answer of the question?

[code]

Complete the table below to show what each variable holds, the user enters the numbers 5, 6, 7, 8, 9

evens:=0;
for count:= 1 to 5 do
begin
writeln('Please enter a number');
readln(numbers[count]);
if (numbers[count] mod 2 = 0) then
begin
evens := evens + 1;
end
end;
writeln(evens);

[/code]

Dear ALL,

Could you tell me what is wrong of my program? The problem is the following wording are often restart: "PLEASE RUN THIS PROGRAM IN A MAXIMUM WINDOW..., TONY YEUNG PRESENT...

How can I add some music for it? How can I change the colour of the font and display into screen?

[code]

Program yeungkt2;
{$APPTYPE CONSOLE}
{
IT113 Assignment - Who wants to be a student millionaire.
Author: Tony Yeung
Date: 16 October 2009
Version 2.03
}
uses
SysUtils,OurCrt;
Type
hotSeat_record=record
lastname :string[12];
firstname :string[12];
address :string[25];
End;

//***** USED VARIABLES **
Var User_Choice :Integer; //global variable
hotSeat_file :file of hotSeat_record;
hotSeat :array[1..100]of hotSeat_record;
numberRecords :integer;
numbers :array[1..6] of integer;
generate :boolean;
ONE :hotSeat_record;
//**** PROCEDURE LOAD ****
Procedure load;
Var
count:integer;
begin
writeln;
writeln;
writeln;
writeln;
writeln;
writeln;
writeln;
writeln;
writeln;
writeln;
writeln(' PLEASE RUN THIS PROGRAM IN A MAXIMIZED WINDOW');
writeln;
writeln(' PRESS <ENTER> TO CONTINUE');
readln;
clrscr;
writeln;
writeln;
writeln;
writeln;
writeln;
writeln;
writeln;
writeln;
writeln;
writeln;
writeln(' T');
sleep(200);
clrscr;
writeln(' TO');
sleep(200);
clrscr;
writeln(' TON');
sleep(200);
clrscr;
writeln(' TONY');
sleep(200);
clrscr;
writeln(' TONY ');
sleep(200);
clrscr;
writeln(' TONY Y');
sleep(200);
clrscr;
writeln(' TONY YE');
sleep(200);
clrscr;
writeln(' TONY YEU');
sleep(200);
clrscr;
writeln(' TONY YEUN');
sleep(200);
clrscr;
writeln(' TONY YEUNG');
sleep(200);
clrscr;
writeln(' TONY YEUNG ');
sleep(200);
clrscr;
writeln(' TONY YEUNG P');
sleep(200);
clrscr;
writeln(' TONY YEUNG PR');
sleep(200);
clrscr;
writeln(' TONY YEUNG PRE');
sleep(200);
clrscr;
writeln(' TONY YEUNG PRES');
sleep(200);
clrscr;
writeln(' TONY YEUNG PRESE');
sleep(200);
clrscr;
writeln(' TONY YEUNG PRESEN');
sleep(200);
clrscr; ...

Dear Sir,

Thank you for your help.

Cheers,

Hi,

Thank you for your kind reply. I am using Borland Delphi but what is TFileStream?

Cheers,

Dear ALL,

Could you tell me how can I write a program that writes to a text file, the 32 people that are in our hotSeat.txt file.

Cheers,

turbomen

(p.s.: 'the question orginally ask me to write a program that writes to a text file, the 32 people that are in our hotSeat.dat file' but it is not possible for me to upload the .dat file to here. So, I have make changes of the .dat file to *.txt file before upload it.)

Dear All,

Could you tell me how can I read from the hotseat.txt file all the records and sort by first name. Finally, list the sorted results on the screen.

Cheers,

turbomen

I am still thinking what I want to do for the coding.

It is not easy.

Dear Sir,

Can I do in the following way??

[code]

Program xxx;

{$APPTYPE CONSOLE}

}

uses
SysUtils,
OurCrt;

Type
hotSeat_record=record
lastname:string[12];
firstname:string[12];
address: string[20];
money:longint;
End;

Var User_Choice:Integer;
hotSeat_file:file of hotSeat_record;
hotSeat:array[1..100]of hotSeat_record;
numberRecords:integer;
numbers: array[1..10] of integer;
generate: boolean;
players:array[1..10] of hotseat_record;

Procedure load;
Var
count:integer;
begin
assign(hotSeat_file,'hotSeat.dat');
reset(hotSeat_file);
numberRecords:= filesize(hotSeat_file);
for count:= 1 to numberRecords do
Begin
read(hotSeat_file,hotSeat[count]);
end;
end;

Procedure ContestantsList;

Var
count:integer;

Begin
numberRecords:= filesize(hotSeat_file);

WriteLn;

for count:= 1 to (filesize(hotSeat_file)) do
Begin
WriteLn(hotSeat[count].firstname:12,hotSeat[count].lastname:12,
hotSeat[count].address:20);
sleep(100);
End;
readln;
end;

Procedure Generate10finalists;
var
count,temp:integer;

begin
writeln('Here are the 10 finalist''s numbers');
randomize;
for count:= 1 to 10 do
begin
temp:=random(numberRecords)+1;
while(temp=numbers[1])
or (temp=numbers[2])
or (temp=numbers[3])
or (temp=numbers[4])
or (temp=numbers[5])
or (temp=numbers[6])
or (temp=numbers[7])
or (temp=numbers [8])
or (temp=numbers [9])
or (temp=numbers [10]) do
begin
temp:=random(numberRecords)+1;
end;
numbers[count]:=temp;
generate := true;
end;

for count := 1 to 10 do
begin
writeln;
writeln(' *<$$$$$>** ' ,(numbers[count]), ' <$$$$>');
writeln;
sleep(100);
end;
writeln(' GOOD LUCK !!!!!!!');
readln;
clrscr;
end;

procedure ques(y:question;var pl:hotseat_record);
var user:char;
begin
y.dollar:=1000;
y.quest:='How many the price of a good laptop?'; {just example...}
y.rightansw:='5000$';
y.answ1:='2000$';
y.answ2:='5000$';
y.answ3:='7000$';

{welcome the player}
writeln('Hi ',pl.firstname);

writeln(y.quest);
writeln('a: ',y.answ1);
writeln('b: ',y.answ2);
writeln('c: ',y.answ3);
readln(user);
case (user)of
    'a':begin
            writeln('wrong answer');
            pl.money:=pl.money-y.dollar;
        end;
    'b':begin
            writeln('good answer,you get ',y.dollar,'$');
            pl.money:=pl.money+y.dollar;
        end;
    'c':begin
            writeln('wrong answer');
            pl.money:=pl.money-y.dollar;
        end;
end;

end;

Procedure ShowFinalists;
var
count: integer;
Begin
if (generate = true) then
begin
WriteLn('3 pressed,finding and listing the finalists...');
WriteLn;
for count:=1 to 10 do
begin
writeln(hotSeat[numbers[count]].firstname:12,
hotSeat[numbers[count]].lastname:12, hotSeat[numbers[count]].address:20);
writeln;
sleep(200);
end
end
else
writeln('Please generate finalist ...