Quantcast
Channel: Delphi Forum - Delphi Programming Kings of Code - Delphi Programming
Viewing all articles
Browse latest Browse all 173

Thread: Showwindow(Handle,sw_Shownormal) Return the black screen form

$
0
0
 İmage Delphi newbie here , please help
Quote:Code:
PHP Code:
var
  
Form1TForm1;

implementation

{$R *.dfm}

procedure TForm1.BitBtn2Click(SenderTObject);
var
 
sName sYearOfBirth sCurrentYear string;
 
iCurrent iBirth iAgeiKidsiJuniorsiBigKidsiTeensiSeniorsiCurrentAge integer;

begin
sName 
:= Edit1.Text ;
sYearOfBirth := Edit2.Text;
sCurrentYear := Edit3.Text ;
iBirth := StrToInt(sYearOfBirth);
iCurrent := StrToInt(sCurrentYear) ;
iCurrentAge := (iCurrent iBirth);
RichEdit1.Lines.Add' Name of entrant is:' sName) ;
RichEdit1.Lines.Add' Your age this year is ' IntToStr(iCurrentAge) ) ;

case 
iAge of
 3..5 
Inc(iKids);
 
6..8 Inc(iJuniors);
 
9..10 Inc(iBigKids);
 
13..16 Inc(iTeens);
 
17..18 Inc(iSeniors);

if 
iAge iCurrentAge
 then RichEdit1
.Lines.Add(' You are eligble to enter this section ')

end;
end;
end
So my problem is that it keeps on giving me 'constant expression exprected' error at the first 'end;' and I have no idea why , any help please 

My project is as follows I'm trying to create an application of that when the user clicks the Process button the program must calculate and display the age of the entrant . This must be checked to see if they are eligible to enter the selected age group category. The program must indicate whether the entrant is allowed to participate according to his/her age.

Using the if , and case statement also Richedit , this is a school task . Any help would be appreciated İmage


 

 

Viewing all articles
Browse latest Browse all 173

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>