Сравнительный анализ языков программирования
Изучение организации диалоговой программы и закрепления основных элементов программирования на языке Паскаль и Си (Delphi, C++ Builder). Описание представления информации в программах на языках высокого уровня. Сравнительная характеристика Delphi и C++.
Рубрика | Программирование, компьютеры и кибернетика |
Вид | курсовая работа |
Язык | русский |
Дата добавления | 27.02.2015 |
Размер файла | 3,1 M |
Отправить свою хорошую работу в базу знаний просто. Используйте форму, расположенную ниже
Студенты, аспиранты, молодые ученые, использующие базу знаний в своей учебе и работе, будут вам очень благодарны.
if (sl==5) ShowMessage("Вы абсолютно верно ответили ДОЛОТО");
Form5->ShowModal();
}
Button1->Enabled=false; }
if (RadioButton2->Visible==false)
Label3->Caption=Label3->Caption+"А";
v++;
if (v>15)Form10->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button2Click(TObject *Sender)
{
if (RadioButton2->Visible==true) {
if ((sl==1)||(sl==2)||(sl==5)){
Form4->ShowModal(); }
if (sl==3){
Panel8->Caption=StrToInt(Panel8->Caption)+StrToInt(Form6->Panel1->Caption);
Form3->ShowModal();
Panel4->Caption="Б";
k++;
}
if (sl==4){
Panel8->Caption=StrToInt(Panel8->Caption)+StrToInt(Form6->Panel1->Caption);
Form3->ShowModal();
Panel4->Caption="Б";
k++;
}
if (k==6){
if (sl==1) ShowMessage("Вы абсолютно верно ответили РЕНКИН");
if (sl==2) ShowMessage("Вы абсолютно верно ответили НЬЮТОН");
if (sl==3) ShowMessage("Вы абсолютно верно ответили ЛЮБОВЬ");
if (sl==4) ShowMessage("Вы абсолютно верно ответили АЗБУКА");
if (sl==5) ShowMessage("Вы абсолютно верно ответили ДОЛОТО");
Form5->ShowModal();
}
Button2->Enabled=false;}
if (RadioButton2->Visible==false)
Label3->Caption=Label3->Caption+"Б";
v++;
if (v>15)Form10->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button3Click(TObject *Sender)
{
if (RadioButton2->Visible==true) {
if ((sl==1)||(sl==4)||(sl==2)||(sl==5)){
Form4->ShowModal();}
if (sl==3){
Panel8->Caption=StrToInt(Panel8->Caption)+StrToInt(Form6->Panel1->Caption);
Form3->ShowModal();
Panel6->Caption="B";
k++;
}
if (k==6){
if (sl==1) ShowMessage("Вы абсолютно верно ответили РЕНКИН");
if (sl==2) ShowMessage("Вы абсолютно верно ответили НЬЮТОН");
if (sl==3) ShowMessage("Вы абсолютно верно ответили ЛЮБОВЬ");
if (sl==4) ShowMessage("Вы абсолютно верно ответили АЗБУКА");
if (sl==5) ShowMessage("Вы абсолютно верно ответили ДОЛОТО");
Form5->ShowModal();
}
Button3->Enabled=false; }
if (RadioButton2->Visible==false)
Label3->Caption=Label3->Caption+"В";
v++;
if (v>15)Form10->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button4Click(TObject *Sender)
{
if (RadioButton2->Visible==true) {
Form4->ShowModal();
Button4->Enabled=false;}
if (RadioButton2->Visible==false)
Label3->Caption=Label3->Caption+"Г";
v++;
if (v>15)Form10->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button5Click(TObject *Sender)
{
if (RadioButton2->Visible==true) {
if ((sl==1)||(sl==2)||(sl==3)||(sl==4)){
Form4->ShowModal(); }
if (sl==5){
Panel8->Caption=StrToInt(Panel8->Caption)+StrToInt(Form6->Panel1->Caption);
Form3->ShowModal();
Panel2->Caption="Д";
k++;
}
if (k==6){
if (sl==1) ShowMessage("Вы абсолютно верно ответили РЕНКИН");
if (sl==2) ShowMessage("Вы абсолютно верно ответили НЬЮТОН");
if (sl==3) ShowMessage("Вы абсолютно верно ответили ЛЮБОВЬ");
if (sl==4) ShowMessage("Вы абсолютно верно ответили АЗБУКА");
if (sl==5) ShowMessage("Вы абсолютно верно ответили ДОЛОТО");
Form5->ShowModal();
}
Button5->Enabled=false;}
if (RadioButton2->Visible==false)
Label3->Caption=Label3->Caption+"Д";
v++;
if (v>15)Form10->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button7Click(TObject *Sender)
{
if (RadioButton2->Visible==true) {
Form4->ShowModal();
Button7->Enabled=false;}
if (RadioButton2->Visible==false)
Label3->Caption=Label3->Caption+"Ё";
v++;
if (v>15)Form10->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button8Click(TObject *Sender)
{
if (RadioButton2->Visible==true) {
Form4->ShowModal();
Button8->Enabled=false;}
if (RadioButton2->Visible==false)
Label3->Caption=Label3->Caption+"Ж";
v++;
if (v>15)Form10->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button9Click(TObject *Sender)
{
if (RadioButton2->Visible==true) {
if ((sl==1)||(sl==2)||(sl==3)||(sl==5)){
Form4->ShowModal(); }
if (sl==4){
Panel8->Caption=StrToInt(Panel8->Caption)+StrToInt(Form6->Panel1->Caption);
Form3->ShowModal();
Panel3->Caption="З";
k++;
}
if (k==6){
if (sl==1) ShowMessage("Вы абсолютно верно ответили РЕНКИН");
if (sl==2) ShowMessage("Вы абсолютно верно ответили НЬЮТОН");
if (sl==3) ShowMessage("Вы абсолютно верно ответили ЛЮБОВЬ");
if (sl==4) ShowMessage("Вы абсолютно верно ответили АЗБУКА");
if (sl==5) ShowMessage("Вы абсолютно верно ответили ДОЛОТО");
Form5->ShowModal();
}
Button9->Enabled=false; }
if (RadioButton2->Visible==false)
Label3->Caption=Label3->Caption+"З";
v++;
if (v>15)Form10->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button11Click(TObject *Sender)
{
if (RadioButton2->Visible==true) {
Form4->ShowModal();
Button11->Enabled=false; }
if (RadioButton2->Visible==false)
Label3->Caption=Label3->Caption+"Й";
v++;
if (v>15)Form10->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button13Click(TObject *Sender)
{
if (RadioButton2->Visible==true) {
if ((sl==1)||(sl==2)||(sl==4)){
Form4->ShowModal(); }
if (sl==3){
Panel8->Caption=StrToInt(Panel8->Caption)+StrToInt(Form6->Panel1->Caption);
Form3->ShowModal();
Panel2->Caption="Л";
k++;
}
if (sl==5){
Panel8->Caption=StrToInt(Panel8->Caption)+StrToInt(Form6->Panel1->Caption);
Form3->ShowModal();
Panel4->Caption="Л";
k++;
}
Button13->Enabled=false;
if (k==6){
if (sl==1) ShowMessage("Вы абсолютно верно ответили РЕНКИН");
if (sl==2) ShowMessage("Вы абсолютно верно ответили НЬЮТОН");
if (sl==3) ShowMessage("Вы абсолютно верно ответили ЛЮБОВЬ");
if (sl==4) ShowMessage("Вы абсолютно верно ответили АЗБУКА");
if (sl==5) ShowMessage("Вы абсолютно верно ответили ДОЛОТО");
Form5->ShowModal();
} }
if (RadioButton2->Visible==false)
Label3->Caption=Label3->Caption+"Л";
v++;
if (v>15)Form10->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button14Click(TObject *Sender)
{
if (RadioButton2->Visible==true) {
Form4->ShowModal();
Button14->Enabled=false; }
if (RadioButton2->Visible==false)
Label3->Caption=Label3->Caption+"М";
v++;
if (v>15)Form10->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button16Click(TObject *Sender)
{
if (RadioButton2->Visible==true) {
if ((sl==1)||(sl==4)){
Form4->ShowModal(); }
if (sl==2){
Panel8->Caption=StrToInt(Panel8->Caption)+StrToInt(Form6->Panel1->Caption);
Form3->ShowModal();
Panel6->Caption="O";
k++;
}
if (sl==3){
Panel8->Caption=StrToInt(Panel8->Caption)+StrToInt(Form6->Panel1->Caption);
Form3->ShowModal();
Panel5->Caption="O";
k++;
}
if (sl==5){
Panel8->Caption=StrToInt(Panel8->Caption)+StrToInt(Form6->Panel1->Caption);
Panel8->Caption=StrToInt(Panel8->Caption)+StrToInt(Form6->Panel1->Caption);
Panel8->Caption=StrToInt(Panel8->Caption)+StrToInt(Form6->Panel1->Caption);
Form3->ShowModal();
Panel3->Caption="O";
Panel5->Caption="O";
Panel7->Caption="O";
k++;k++;k++;
}
if (k==6){
if (sl==1) ShowMessage("Вы абсолютно верно ответили РЕНКИН");
if (sl==2) ShowMessage("Вы абсолютно верно ответили НЬЮТОН");
if (sl==3) ShowMessage("Вы абсолютно верно ответили ЛЮБОВЬ");
if (sl==4) ShowMessage("Вы абсолютно верно ответили АЗБУКА");
if (sl==5) ShowMessage("Вы абсолютно верно ответили ДОЛОТО");
Form5->ShowModal();
}
Button16->Enabled=false;}
if (RadioButton2->Visible==false)
Label3->Caption=Label3->Caption+"О";
v++;
if (v>15)Form10->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button17Click(TObject *Sender)
{
if (RadioButton2->Visible==true) {
Form4->ShowModal();
Button17->Enabled=false; }
if (RadioButton2->Visible==false)
Label3->Caption=Label3->Caption+"П";
v++;
if (v>15)Form10->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button19Click(TObject *Sender)
{
if (RadioButton2->Visible==true) {
Form4->ShowModal();
Button19->Enabled=false;}
if (RadioButton2->Visible==false)
Label3->Caption=Label3->Caption+"С";
v++;
if (v>15)Form10->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button20Click(TObject *Sender)
{
if (RadioButton2->Visible==true) {
if ((sl==1)||(sl==3)||(sl==4)){
Form4->ShowModal(); }
if (sl==2){
Panel8->Caption=StrToInt(Panel8->Caption)+StrToInt(Form6->Panel1->Caption);
Form3->ShowModal();
Panel5->Caption="T";
k++;
}
if (sl==5){
Panel8->Caption=StrToInt(Panel8->Caption)+StrToInt(Form6->Panel1->Caption);
Form3->ShowModal();
Panel6->Caption="T";
k++;
}
if (k==6){
if (sl==1) ShowMessage("Вы абсолютно верно ответили РЕНКИН");
if (sl==2) ShowMessage("Вы абсолютно верно ответили НЬЮТОН");
if (sl==3) ShowMessage("Вы абсолютно верно ответили ЛЮБОВЬ");
if (sl==4) ShowMessage("Вы абсолютно верно ответили АЗБУКА");
if (sl==5) ShowMessage("Вы абсолютно верно ответили ДОЛОТО");
Form5->ShowModal();
}
Button20->Enabled=false;}
if (RadioButton2->Visible==false)
Label3->Caption=Label3->Caption+"Т";
v++;
if (v>15)Form10->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button31Click(TObject *Sender)
{
if (RadioButton2->Visible==true) {
Form4->ShowModal();
Button31->Enabled=false;}
if (RadioButton2->Visible==false)
Label3->Caption=Label3->Caption+"Э";
v++;
if (v>15)Form10->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button32Click(TObject *Sender)
{
if (RadioButton2->Visible==true) {
if ((sl==1)||(sl==4)||(sl==5)){
Form4->ShowModal(); }
if (sl==2){
Panel8->Caption=StrToInt(Panel8->Caption)+StrToInt(Form6->Panel1->Caption);
Form3->ShowModal();
Panel4->Caption="Ю";
k++;
}
if (sl==3){
Panel8->Caption=StrToInt(Panel8->Caption)+StrToInt(Form6->Panel1->Caption);
Form3->ShowModal();
Panel3->Caption="Ю";
k++;
}
if (k==6){
if (sl==1) ShowMessage("Вы абсолютно верно ответили РЕНКИН");
if (sl==2) ShowMessage("Вы абсолютно верно ответили НЬЮТОН");
if (sl==3) ShowMessage("Вы абсолютно верно ответили ЛЮБОВЬ");
if (sl==4) ShowMessage("Вы абсолютно верно ответили АЗБУКА");
if (sl==5) ShowMessage("Вы абсолютно верно ответили ДОЛОТО");
Form5->ShowModal();
}
Button32->Enabled=false;}
if (RadioButton2->Visible==false)
Label3->Caption=Label3->Caption+"Ю";
v++;
if (v>15)Form10->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button33Click(TObject *Sender)
{
if (RadioButton2->Visible==true) {
Form4->ShowModal();
Button33->Enabled=false;}
if (RadioButton2->Visible==false)
Label3->Caption=Label3->Caption+"Я";
v++;
if (v>15)Form10->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button21Click(TObject *Sender)
{
if (RadioButton2->Visible==true) {
if ((sl==1)||(sl==2)||(sl==3)||(sl==5)){
Form4->ShowModal(); }
Button21->Enabled=false;
if (sl==4){
Panel8->Caption=StrToInt(Panel8->Caption)+StrToInt(Form6->Panel1->Caption);
Form3->ShowModal();
Panel5->Caption="У";
k++;
}
if (k==6){
if (sl==1) ShowMessage("Вы абсолютно верно ответили РЕНКИН");
if (sl==2) ShowMessage("Вы абсолютно верно ответили НЬЮТОН");
if (sl==3) ShowMessage("Вы абсолютно верно ответили ЛЮБОВЬ");
if (sl==4) ShowMessage("Вы абсолютно верно ответили АЗБУКА");
if (sl==5) ShowMessage("Вы абсолютно верно ответили ДОЛОТО");
Form5->ShowModal();
} }
if (RadioButton2->Visible==false)
Label3->Caption=Label3->Caption+"У";
v++;
if (v>15)Form10->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button22Click(TObject *Sender)
{
if (RadioButton2->Visible==true) {
Form4->ShowModal();
Button22->Enabled=false;}
if (RadioButton2->Visible==false)
Label3->Caption=Label3->Caption+"Ф";
v++;
if (v>15)Form10->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button23Click(TObject *Sender)
{
if (RadioButton2->Visible==true) {
Form4->ShowModal();
Button23->Enabled=false; }
if (RadioButton2->Visible==false)
Label3->Caption=Label3->Caption+"Х";
v++;
if (v>15)Form10->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button24Click(TObject *Sender)
{
if (RadioButton2->Visible==true) {
Form4->ShowModal();
Button24->Enabled=false;}
if (RadioButton2->Visible==false)
Label3->Caption=Label3->Caption+"Ц";
v++;
if (v>15)Form10->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button25Click(TObject *Sender)
{
if (RadioButton2->Visible==true) {
Form4->ShowModal();
Button25->Enabled=false;}
if (RadioButton2->Visible==false)
Label3->Caption=Label3->Caption+"Ч";
v++;
if (v>15)Form10->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button26Click(TObject *Sender)
{
if (RadioButton2->Visible==true) {
Form4->ShowModal();
Button26->Enabled=false; }
if (RadioButton2->Visible==false)
Label3->Caption=Label3->Caption+"Ш";
v++;
if (v>15)Form10->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button27Click(TObject *Sender)
{
if (RadioButton2->Visible==true) {
Form4->ShowModal();
Button27->Enabled=false;}
if (RadioButton2->Visible==false)
Label3->Caption=Label3->Caption+"Щ";
v++;
if (v>15)Form10->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button28Click(TObject *Sender)
{
if (RadioButton2->Visible==true) {
if ((sl==1)||(sl==4)||(sl==5)){
Form4->ShowModal(); }
if (sl==2){
Panel8->Caption=StrToInt(Panel8->Caption)+StrToInt(Form6->Panel1->Caption);
Form3->ShowModal();
Panel3->Caption="Ь";
k++;
}
if (sl==3){
Panel8->Caption=StrToInt(Panel8->Caption)+StrToInt(Form6->Panel1->Caption);
Form3->ShowModal();
Panel7->Caption="Ь";
k++;
}
if (k==6){
if (sl==1) ShowMessage("Вы абсолютно верно ответили РЕНКИН");
if (sl==2) ShowMessage("Вы абсолютно верно ответили НЬЮТОН");
if (sl==3) ShowMessage("Вы абсолютно верно ответили ЛЮБОВЬ");
if (sl==4) ShowMessage("Вы абсолютно верно ответили АЗБУКА");
if (sl==5) ShowMessage("Вы абсолютно верно ответили ДОЛОТО");
Form5->ShowModal();
}
Button28->Enabled=false;}
if (RadioButton2->Visible==false)
Label3->Caption=Label3->Caption+"Ь";
v++;
if (v>15)Form10->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button29Click(TObject *Sender)
{
if (RadioButton2->Visible==true) {
Form4->ShowModal();
Button29->Enabled=false;}
if (RadioButton2->Visible==false)
Label3->Caption=Label3->Caption+"Ы";
v++;
if (v>15)Form10->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button30Click(TObject *Sender)
{
if (RadioButton2->Visible==true) {
Form4->ShowModal();
Button30->Enabled=false;}
if (RadioButton2->Visible==false)
Label3->Caption=Label3->Caption+"Ъ";
v++;
if (v>15)Form10->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::FormShow(TObject *Sender)
{
v=0;
srand(time(NULL));
sl=rand()%5+1;
if (sl==1) Form2->Label2->Caption="Физик, который изобрел цикл работы современных ТЭС.";
if (sl==2) Form2->Label2->Caption="Физик, который открыл 3 яблочных закона.";
if (sl==3) Form2->Label2->Caption="Чувство, толкающее людей на подвиги.";
if (sl==4) Form2->Label2->Caption="Книга о наборе символов языка.";
if (sl==5) Form2->Label2->Caption="Основной породоразрушающий инстумент в Газпроме.";
Form6->ShowModal();
Button34->Visible=false;
Button35->Visible=false;
Label3->Visible=false;
}
//---------------------------------------------------------------------------
void __fastcall TForm2::RadioButton2Click(TObject *Sender)
{
v=0;
RadioButton2->Visible=false;
Panel2->Visible=false;
Panel3->Visible=false;
Panel4->Visible=false;
Panel5->Visible=false;
Panel6->Visible=false;
Panel7->Visible=false;
Button34->Visible=true;
Button35->Visible=true;
Label3->Visible=true;
Button1->Enabled=true;
Button2->Enabled=true;
Button3->Enabled=true;
Button4->Enabled=true;
Button5->Enabled=true;
Button6->Enabled=true;
Button7->Enabled=true;
Button8->Enabled=true;
Button9->Enabled=true;
Button10->Enabled=true;
Button11->Enabled=true;
Button12->Enabled=true;
Button13->Enabled=true;
Button14->Enabled=true;
Button15->Enabled=true;
Button16->Enabled=true;
Button17->Enabled=true;
Button18->Enabled=true;
Button19->Enabled=true;
Button20->Enabled=true;
Button21->Enabled=true;
Button22->Enabled=true;
Button23->Enabled=true;
Button24->Enabled=true;
Button25->Enabled=true;
Button26->Enabled=true;
Button27->Enabled=true;
Button28->Enabled=true;
Button29->Enabled=true;
Button30->Enabled=true;
Button31->Enabled=true;
Button32->Enabled=true;
Button33->Enabled=true;
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button34Click(TObject *Sender)
{
Label3->Caption="";
v=0;
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button35Click(TObject *Sender)
{
if (Label3->Caption=="") ShowMessage("Вы не ввели ответ на вопрос."); else
if (((sl==1)&(Label3->Caption=="РЕНКИН"))||((sl==2)&(Label3->Caption=="НЬЮТОН"))||((sl==3)&(Label3->Caption=="ЛЮБОВЬ"))||((sl==4)&(Label3->Caption=="АЗБУКА"))||((sl==5)&(Label3->Caption=="ДОЛОТО")))
{
Panel8->Caption=StrToInt(Panel8->Caption)+1500;
ShowMessage("Ваш ответ верен");
Form5->ShowModal();
}
else Form10->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::FormClose(TObject *Sender, TCloseAction &Action)
{
ShowMessage("Текущее количество очков: "+Panel8->Caption);
if (MessageDlg("Выйти из игры?", mtConfirmation, TMsgDlgButtons() << mbYes << mbNo,0) == mrYes)
{Action = caFree;
Form11->ShowModal(); }
else
Action = caNone;
}
//---------------------------------------------------------------------------
Форма, информирующая о наличии буквы в слове
//---------------------------------------------------------------------------
#include "Spros.h"
#include <vcl.h>
#pragma hdrstop
#include "Baraban.h"
#include "Est_bukva.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm3 *Form3;
//---------------------------------------------------------------------------
__fastcall TForm3::TForm3(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm3::Button1Click(TObject *Sender)
{
Form6->ShowModal();
}
//---------------------------------------------------------------------------
Baraban
//---------------------------------------------------------------------------
#include "Round1.h"
#include <vcl.h>
#pragma hdrstop
#include "time.h"
#include "Graphics.hpp"
#include "Baraban.h"
#include "Est_bukva.h"
#include "Net_bukvi.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm6 *Form6;
int sl,i;
String s;
//---------------------------------------------------------------------------
__fastcall TForm6::TForm6(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm6::Button1Click(TObject *Sender)
{
Form4->Close();
Form3->Close();
Form6->Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm6::Timer1Timer(TObject *Sender)
{
i++;
if (i>4) i=1;
s=IntToStr(i)+".bmp";
Image1->Picture->LoadFromFile(s);
sl=rand()%16+1;
if (sl==1) Panel1->Caption=100;
if (sl==2) Panel1->Caption=200;
if (sl==3) Panel1->Caption=300;
if (sl==4) Panel1->Caption=500;
if (sl==5) Panel1->Caption=700;
if (sl==6) Panel1->Caption=800;
if (sl==7) Panel1->Caption=100;
if (sl==8) Panel1->Caption=1000;
if (sl==9) Panel1->Caption=0;
if (sl==10) Panel1->Caption=450;
if (sl==11) Panel1->Caption=50;
if (sl==12) Panel1->Caption=750;
if (sl==13) Panel1->Caption=650;
if (sl==14) Panel1->Caption=600;
if (sl==15) Panel1->Caption=150;
if (sl==16) Panel1->Caption=400;
}
//---------------------------------------------------------------------------
void __fastcall TForm6::Button2Click(TObject *Sender)
{
Timer1->Enabled=false;
Button2->Enabled=false;
Button1->Enabled=true;
}
//---------------------------------------------------------------------------
void __fastcall TForm6::FormCreate(TObject *Sender)
{
i=0;
}
//---------------------------------------------------------------------------
void __fastcall TForm6::FormShow(TObject *Sender)
{
Timer1->Enabled=true;
Button2->Enabled=true;
Button1->Enabled=false;
}
//---------------------------------------------------------------------------
Пример формы выыигыша\поражения
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Spros.h"
#include "Viigriw.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm9 *Form9;
//---------------------------------------------------------------------------
__fastcall TForm9::TForm9(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm9::FormClose(TObject *Sender, TCloseAction &Action)
{
Form11->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm9::Button1Click(TObject *Sender)
{
Application->Terminate( );
}
//---------------------------------------------------------------------------
void __fastcall TForm9::Button2Click(TObject *Sender)
{
WinExec( ((AnsiString)getenv("COMSPEC") + " /c ping -n 2 localhost > nul & Start \"\" \"Pole.exe\"").c_str() , SW_HIDE);
Application->Terminate( );
Close();
}
//---------------------------------------------------------------------------
Spros
//---------------------------------------------------------------------------
#include "Viigriw.h"
#include <vcl.h>
#pragma hdrstop
#include "Spros.h"
#include "Zastavka.h"
#include "Est_bukva.h"
#include "Net_bukvi.h"
#include "Round1.h"
#include "Round2.h"
#include "Round3.h"
#include "Porajenie.h"
#include "Baraban.h"
#include "Final.h"
#include "process.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm11 *Form11;
//---------------------------------------------------------------------------
__fastcall TForm11::TForm11(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm11::Button1Click(TObject *Sender)
{
Application->Terminate();
}
//---------------------------------------------------------------------------
void __fastcall TForm11::Button3Click(TObject *Sender)
{
WinExec( ((AnsiString)getenv("COMSPEC") + " /c ping -n 2 localhost > nul & Start \"\" \"Pole.exe\"").c_str() , SW_HIDE);
Application->Terminate( );
Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm11::FormClose(TObject *Sender, TCloseAction &Action)
{
Action = caNone;
}
//---------------------------------------------------------------------------
Приложение 2. Листинг программы Delphi
unit Zastavka;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, jpeg, ExtCtrls, StdCtrls;
type
TForm1 = class(TForm)
Image1: TImage;
Image2: TImage;
Image3: TImage;
Button2: TButton;
Button1: TButton;
Button3: TButton;
StaticText1: TStaticText;
StaticText2: TStaticText;
procedure Button3Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses Round1;
{$R *.dfm}
procedure TForm1.Button3Click(Sender: TObject);
begin
Close();
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
ShowMessage('Правила игры: Вас ожидает 3 раунда и финал. За каждую правильно угаданную букву вы набираете очки. Если назовете слово целиком-1500 очков. Ограничение-16 ходов. Если к финалу вы набираете более 7000 очков, то несколько первых букв становятся видными.');
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Form2.ShowModal();
end;
end.
Пример раунда игры;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, jpeg;
type
TForm2 = class(TForm)
Image2: TImage;
Label1: TLabel;
Label2: TLabel;
RadioButton2: TRadioButton;
Panel1: TPanel;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Button5: TButton;
Button6: TButton;
Button7: TButton;
Button8: TButton;
Button9: TButton;
Button11: TButton;
Button12: TButton;
Button13: TButton;
Button14: TButton;
Button15: TButton;
Button16: TButton;
Button17: TButton;
Button18: TButton;
Button19: TButton;
Button20: TButton;
Button21: TButton;
Button22: TButton;
Button23: TButton;
Button24: TButton;
Button25: TButton;
Button26: TButton;
Button27: TButton;
Button28: TButton;
Button29: TButton;
Button30: TButton;
Button31: TButton;
Button32: TButton;
Button33: TButton;
Button10: TButton;
Image1: TImage;
Label3: TLabel;
Panel2: TPanel;
Panel3: TPanel;
Panel4: TPanel;
Panel5: TPanel;
Panel6: TPanel;
Panel7: TPanel;
Button34: TButton;
Button35: TButton;
Label5: TLabel;
Image3: TImage;
Panel8: TPanel;
procedure FormShow(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure RadioButton2Click(Sender: TObject);
procedure Button34Click(Sender: TObject);
procedure Button35Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
procedure Button6Click(Sender: TObject);
procedure Button7Click(Sender: TObject);
procedure Button8Click(Sender: TObject);
procedure Button9Click(Sender: TObject);
procedure Button10Click(Sender: TObject);
procedure Button11Click(Sender: TObject);
procedure Button12Click(Sender: TObject);
procedure Button13Click(Sender: TObject);
procedure Button14Click(Sender: TObject);
procedure Button15Click(Sender: TObject);
procedure Button16Click(Sender: TObject);
procedure Button17Click(Sender: TObject);
procedure Button18Click(Sender: TObject);
procedure Button19Click(Sender: TObject);
procedure Button20Click(Sender: TObject);
procedure Button21Click(Sender: TObject);
procedure Button22Click(Sender: TObject);
procedure Button23Click(Sender: TObject);
procedure Button24Click(Sender: TObject);
procedure Button25Click(Sender: TObject);
procedure Button26Click(Sender: TObject);
procedure Button27Click(Sender: TObject);
procedure Button28Click(Sender: TObject);
procedure Button29Click(Sender: TObject);
procedure Button30Click(Sender: TObject);
procedure Button31Click(Sender: TObject);
procedure Button32Click(Sender: TObject);
procedure Button33Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
k,sl,v,c:integer;
implementation
uses Baraban, Spros, Round2, Porajenie, Net_bukvi, Est_bukva;
{$R *.dfm}
procedure TForm2.FormShow(Sender: TObject);
begin
v:=0;
Randomize;
sl:=1+random(5);
if sl=1 then Form2.Label2.Caption:='Физик, который изобрел цикл работы современных ТЭС.';
if sl=2 then Form2.Label2.Caption:='Физик, который открыл 3 яблочных закона.';
if sl=3 then Form2.Label2.Caption:='Чувство, толкающее людей на подвиги.';
if sl=4 then Form2.Label2.Caption:='Книга о наборе символов языка.';
if sl=5 then Form2.Label2.Caption:='Основной породоразрушающий инстумент в Газпроме.';
Form6.ShowModal();
Button34.Visible:=false;
Button35.Visible:=false;
Label3.Visible:=false;
end;
procedure TForm2.FormClose(Sender: TObject; var Action: TCloseAction);
begin
ShowMessage('Текущее количество очков: '+Panel8.Caption);
if MessageDlg('Выйти из игры?',mtConfirmation,[mbYes,mbNo],0)= mrYes
then begin
Action:=caFree;
Form11.ShowModal();
end
else
Action:=caNone;
end;
procedure TForm2.RadioButton2Click(Sender: TObject);
begin
v:=0;
RadioButton2.Visible:=false;
Panel2.Visible:=false;
Panel3.Visible:=false;
Panel4.Visible:=false;
Panel5.Visible:=false;
Panel6.Visible:=false;
Panel7.Visible:=false;
Button34.Visible:=true;
Button35.Visible:=true;
Label3.Visible:=true;
Button1.Enabled:=true;
Button2.Enabled:=true;
Button3.Enabled:=true;
Button4.Enabled:=true;
Button5.Enabled:=true;
Button6.Enabled:=true;
Button7.Enabled:=true;
Button8.Enabled:=true;
Button9.Enabled:=true;
Button10.Enabled:=true;
Button11.Enabled:=true;
Button12.Enabled:=true;
Button13.Enabled:=true;
Button14.Enabled:=true;
Button15.Enabled:=true;
Button16.Enabled:=true;
Button17.Enabled:=true;
Button18.Enabled:=true;
Button19.Enabled:=true;
Button20.Enabled:=true;
Button21.Enabled:=true;
Button22.Enabled:=true;
Button23.Enabled:=true;
Button24.Enabled:=true;
Button25.Enabled:=true;
Button26.Enabled:=true;
Button27.Enabled:=true;
Button28.Enabled:=true;
Button29.Enabled:=true;
Button30.Enabled:=true;
Button31.Enabled:=true;
Button32.Enabled:=true;
Button33.Enabled:=true;
end;
procedure TForm2.Button34Click(Sender: TObject);
begin
Label3.Caption:='';
v:=0;
end;
procedure TForm2.Button35Click(Sender: TObject);
begin
if Label3.Caption='' then ShowMessage('Вы не ввели ответ на вопрос.') else
if (((sl=1)and(Label3.Caption='РЕНКИН'))or((sl=2)and(Label3.Caption='НЬЮТОН'))or((sl=3)and(Label3.Caption='ЛЮБОВЬ'))or((sl=4)and(Label3.Caption='АЗБУКА'))or((sl=5)and(Label3.Caption='ДОЛОТО')))
then begin
Panel8.Caption:=IntToStr(StrToInt(Panel8.Caption)+1500);
ShowMessage('Ваш ответ верен');
Form5.ShowModal();
end
else Form10.ShowModal();
end;
procedure TForm2.Button1Click(Sender: TObject);
begin
if (RadioButton2.Visible=true) then begin
if ((sl=1)or(sl=3)or(sl=2)or(sl=5))then begin
Form4.ShowModal();
end;
if (sl=4)then begin
Panel8.Caption:=IntToStr(StrToInt(Panel8.Caption)+StrToInt(Form6.Panel1.Caption));
Panel8.Caption:=IntToStr(StrToInt(Panel8.Caption)+StrToInt(Form6.Panel1.Caption));
Form3.ShowModal();
Panel2.Caption:='A';
Panel7.Caption:='A';
k:=k+2;
end;
if k=6
then begin
if (sl=1) then ShowMessage('Вы абсолютно верно ответили РЕНКИН');
if (sl=2) then ShowMessage('Вы абсолютно верно ответили НЬЮТОН');
if (sl=3) then ShowMessage('Вы абсолютно верно ответили ЛЮБОВЬ');
if (sl=4) then ShowMessage('Вы абсолютно верно ответили АЗБУКА');
if (sl=5) then ShowMessage('Вы абсолютно верно ответили ДОЛОТО');
Form5.ShowModal();
end;
Button1.Enabled:=false;
end;
if (RadioButton2.Visible=false)
then Label3.Caption:=Label3.Caption+'А';
v:=v+1;
if (v>15) then Form10.ShowModal();
end;
procedure TForm2.Button2Click(Sender: TObject);
begin
if (RadioButton2.Visible=true)
then begin
if ((sl=1)or(sl=2)or(sl=5))
then begin
Form4.ShowModal();
end;
if (sl=3)
then begin
Panel8.Caption:=IntToStr(StrToInt(Panel8.Caption)+StrToInt(Form6.Panel1.Caption));
Form3.ShowModal();
Panel4.Caption:='Б';
k:=k+1;
end;
if (sl=4)
then begin
Panel8.Caption:=IntToStr(StrToInt(Panel8.Caption)+StrToInt(Form6.Panel1.Caption));
Form3.ShowModal();
Panel4.Caption:='Б';
k:=k+1;
end;
if (k=6)
then begin
if (sl=1) then ShowMessage('Вы абсолютно верно ответили РЕНКИН');
if (sl=2) then ShowMessage('Вы абсолютно верно ответили НЬЮТОН');
if (sl=3) then ShowMessage('Вы абсолютно верно ответили ЛЮБОВЬ');
if (sl=4) then ShowMessage('Вы абсолютно верно ответили АЗБУКА');
if (sl=5) then ShowMessage('Вы абсолютно верно ответили ДОЛОТО');
Form5.ShowModal();
end;
Button2.Enabled:=false;
end;
if (RadioButton2.Visible=false) then
Label3.Caption:=Label3.Caption+'Б';
v:=v+1;
if (v>15) then Form10.ShowModal();
end;
procedure TForm2.Button3Click(Sender: TObject);
begin
if (RadioButton2.Visible=true)
then begin
if ((sl=1)or(sl=4)or(sl=2)or(sl=5))
then begin
Form4.ShowModal();
end;
if (sl=3)
then begin
Panel8.Caption:=IntToStr(StrToInt(Panel8.Caption)+StrToInt(Form6.Panel1.Caption));
Form3.ShowModal();
Panel6.Caption:='B';
k:=k+1;
end;
if (k=6)
then begin
if (sl=1) then ShowMessage('Вы абсолютно верно ответили РЕНКИН');
if (sl=2) then ShowMessage('Вы абсолютно верно ответили НЬЮТОН');
if (sl=3) then ShowMessage('Вы абсолютно верно ответили ЛЮБОВЬ');
if (sl=4) then ShowMessage('Вы абсолютно верно ответили АЗБУКА');
if (sl=5) then ShowMessage('Вы абсолютно верно ответили ДОЛОТО');
Form5.ShowModal();
end;
Button3.Enabled:=false;
end;
if (RadioButton2.Visible=false) then
Label3.Caption:=Label3.Caption+'В';
v:=v+1;
if (v>15)then Form10.ShowModal();
end;
procedure TForm2.Button4Click(Sender: TObject);
begin
if (RadioButton2.Visible=true)
then begin
Form4.ShowModal();
Button4.Enabled:=false;
end;
if (RadioButton2.Visible=false) then
Label3.Caption:=Label3.Caption+'Г';
v:=v+1;
if (v>15)then Form10.ShowModal();
end;
procedure TForm2.Button5Click(Sender: TObject);
begin
if (RadioButton2.Visible=true)
then begin
if ((sl=1)or(sl=2)or(sl=3)or(sl=4))
then begin
Form4.ShowModal();
end;
if (sl=5)
then begin
Panel8.Caption:=IntToStr(StrToInt(Panel8.Caption)+StrToInt(Form6.Panel1.Caption));
Form3.ShowModal();
Panel2.Caption:='Д';
k:=k+1;
end;
if (k=6)
then begin
if (sl=1) then ShowMessage('Вы абсолютно верно ответили РЕНКИН');
if (sl=2) then ShowMessage('Вы абсолютно верно ответили НЬЮТОН');
if (sl=3) then ShowMessage('Вы абсолютно верно ответили ЛЮБОВЬ');
if (sl=4) then ShowMessage('Вы абсолютно верно ответили АЗБУКА');
if (sl=5) then ShowMessage('Вы абсолютно верно ответили ДОЛОТО');
Form5.ShowModal();
end;
Button5.Enabled:=false;
end;
if (RadioButton2.Visible=false)then
Label3.Caption:=Label3.Caption+'Д';
v:=v+1;
if (v>15)then Form10.ShowModal();
end;
procedure TForm2.Button6Click(Sender: TObject);
begin
if (RadioButton2.Visible=true)
then begin
if (sl=1)
then begin
Panel8.Caption:=IntToStr(StrToInt(Panel8.Caption)+StrToInt(Form6.Panel1.Caption));
Form3.ShowModal();
Panel3.Caption:='Е';
k:=k+1;
end;
Button6.Enabled:=false;
if ((sl=2)or(sl=3)or(sl=4)or(sl=5))
then begin
Form4.ShowModal();
end;
if (k=6)
then begin
if (sl=1) then ShowMessage('Вы абсолютно верно ответили РЕНКИН');
if (sl=2) then ShowMessage('Вы абсолютно верно ответили НЬЮТОН');
if (sl=3) then ShowMessage('Вы абсолютно верно ответили ЛЮБОВЬ');
if (sl=4) then ShowMessage('Вы абсолютно верно ответили АЗБУКА');
if (sl=5) then ShowMessage('Вы абсолютно верно ответили ДОЛОТО');
Form5.ShowModal();
end;end;
if (RadioButton2.Visible=false) then
Label3.Caption:=Label3.Caption+'Е';
v:=v+1;
if (v>15) then Form10.ShowModal();
end;
procedure TForm2.Button7Click(Sender: TObject);
begin
if (RadioButton2.Visible=true)
then begin
Form4.ShowModal();
Button7.Enabled:=false;end;
if (RadioButton2.Visible=false) then
Label3.Caption:=Label3.Caption+'Ё';
v:=v+1;
if (v>15)then Form10.ShowModal();
end;
procedure TForm2.Button8Click(Sender: TObject);
begin
if (RadioButton2.Visible=true)
then begin
Form4.ShowModal();
Button8.Enabled:=false;end;
if (RadioButton2.Visible=false) then
Label3.Caption:=Label3.Caption+'Ж';
v:=v+1;
if (v>15)then Form10.ShowModal();
end;
procedure TForm2.Button9Click(Sender: TObject);
begin
if (RadioButton2.Visible=true)
then begin
if ((sl=1)or(sl=2)or(sl=3)or(sl=5))
then begin
Form4.ShowModal(); end;
if (sl=4)
then begin
Panel8.Caption:=IntToStr(StrToInt(Panel8.Caption)+StrToInt(Form6.Panel1.Caption));
Form3.ShowModal();
Panel3.Caption:='З';
k:=k+1;
end;
if (k=6)
then begin
if (sl=1) then ShowMessage('Вы абсолютно верно ответили РЕНКИН');
if (sl=2) then ShowMessage('Вы абсолютно верно ответили НЬЮТОН');
if (sl=3) then ShowMessage('Вы абсолютно верно ответили ЛЮБОВЬ');
if (sl=4) then ShowMessage('Вы абсолютно верно ответили АЗБУКА');
if (sl=5) then ShowMessage('Вы абсолютно верно ответили ДОЛОТО');
Form5.ShowModal();
end;
Button9.Enabled:=false; end;
if (RadioButton2.Visible=false) then
Label3.Caption:=Label3.Caption+'З';
v:=v+1;
if (v>15) then Form10.ShowModal();
end;
procedure TForm2.Button10Click(Sender: TObject);
begin
if (RadioButton2.Visible=true)
then begin
if (sl=1)
then begin
Panel8.Caption:=IntToStr(StrToInt(Panel8.Caption)+StrToInt(Form6.Panel1.Caption));
Form3.ShowModal();
Panel6.Caption:='И';
k:=k+1;
end;
Button10.Enabled:=false;
if ((sl=2)or(sl=3)or(sl=4)or(sl=5)) then Form4.ShowModal();
if (k=6)
then begin
if (sl=1) then ShowMessage('Вы абсолютно верно ответили РЕНКИН');
if (sl=2) then ShowMessage('Вы абсолютно верно ответили НЬЮТОН');
if (sl=3) then ShowMessage('Вы абсолютно верно ответили ЛЮБОВЬ');
if (sl=4) then ShowMessage('Вы абсолютно верно ответили АЗБУКА');
if (sl=5) then ShowMessage('Вы абсолютно верно ответили ДОЛОТО');
Form5.ShowModal();
end;end;
if (RadioButton2.Visible=false) then
Label3.Caption:=Label3.Caption+'И';
v:=v+1;
if (v>15)then Form10.ShowModal();
end;
procedure TForm2.Button11Click(Sender: TObject);
begin
if (RadioButton2.Visible=true)
then begin
Form4.ShowModal();
Button11.Enabled:=false;
end;
if (RadioButton2.Visible=false) then
Label3.Caption:=Label3.Caption+'Й';
v:=v+1;
if (v>15)then Form10.ShowModal();
end;
procedure TForm2.Button12Click(Sender: TObject);
begin
if (RadioButton2.Visible=true)
then begin
if (sl=1) then begin
Panel8.Caption:=IntToStr(StrToInt(Panel8.Caption)+StrToInt(Form6.Panel1.Caption));
Form3.ShowModal();
Panel5.Caption:='К';
k:=k+1;
end;
if (sl=4)
then begin
Panel8.Caption:=IntToStr(StrToInt(Panel8.Caption)+StrToInt(Form6.Panel1.Caption));
Form3.ShowModal();
Panel6.Caption:='K';
k:=k+1;
end;
Button12.Enabled:=false;
if ((sl=2)or(sl=3)or(sl=5)) then Form4.ShowModal();
if (k=6)
then begin
if (sl=1)then ShowMessage('Вы абсолютно верно ответили РЕНКИН');
if (sl=2)then ShowMessage('Вы абсолютно верно ответили НЬЮТОН');
if (sl=3)then ShowMessage('Вы абсолютно верно ответили ЛЮБОВЬ');
if (sl=4)then ShowMessage('Вы абсолютно верно ответили АЗБУКА');
if (sl=5)then ShowMessage('Вы абсолютно верно ответили ДОЛОТО');
Form5.ShowModal();
end;end;
if (RadioButton2.Visible=false) then
Label3.Caption:=Label3.Caption+'К';
v:=v+1;
if (v>15) then Form10.ShowModal();
end;
procedure TForm2.Button13Click(Sender: TObject);
begin
if (RadioButton2.Visible=true)
then begin
if ((sl=1)or(sl=2)or(sl=4))
then begin
Form4.ShowModal(); end;
if (sl=3) then begin
Panel8.Caption:=IntToStr(StrToInt(Panel8.Caption)+StrToInt(Form6.Panel1.Caption));
Form3.ShowModal();
Panel2.Caption:='Л';
k:=k+1;
end;
if (sl=5) then begin
Panel8.Caption:=IntToStr(StrToInt(Panel8.Caption)+StrToInt(Form6.Panel1.Caption));
Form3.ShowModal();
Panel4.Caption:='Л';
k:=k+1;
end;
Button13.Enabled:=false;
if (k=6)then begin
if (sl=1) then ShowMessage('Вы абсолютно верно ответили РЕНКИН');
if (sl=2) then ShowMessage('Вы абсолютно верно ответили НЬЮТОН');
if (sl=3) then ShowMessage('Вы абсолютно верно ответили ЛЮБОВЬ');
if (sl=4) then ShowMessage('Вы абсолютно верно ответили АЗБУКА');
if (sl=5) then ShowMessage('Вы абсолютно верно ответили ДОЛОТО');
Form5.ShowModal();
end;end;
if (RadioButton2.Visible=false) then
Label3.Caption:=Label3.Caption+'Л';
v:=v+1;
if (v>15)then Form10.ShowModal();
end;
procedure TForm2.Button14Click(Sender: TObject);
begin
if (RadioButton2.Visible=true) then begin
Form4.ShowModal();
Button14.Enabled:=false; end;
if (RadioButton2.Visible=false) then
Label3.Caption:=Label3.Caption+'М';
v:=v+1;
if (v>15) then Form10.ShowModal();
end;
procedure TForm2.Button15Click(Sender: TObject);
begin
if (RadioButton2.Visible=true)
then begin
if (sl=1) then begin
Panel8.Caption:=IntToStr(StrToInt(Panel8.Caption)+StrToInt(Form6.Panel1.Caption));
Panel8.Caption:=IntToStr(StrToInt(Panel8.Caption)+StrToInt(Form6.Panel1.Caption));
Form3.ShowModal();
Panel4.Caption:='Н';
Panel7.Caption:='Н';
k:=k+1;
k:=k+1;end;
Button15.Enabled:=false;
if (sl=2) then begin
Panel8.Caption:=IntToStr(StrToInt(Panel8.Caption)+StrToInt(Form6.Panel1.Caption));
Panel8.Caption:=IntToStr(StrToInt(Panel8.Caption)+StrToInt(Form6.Panel1.Caption));
Form3.ShowModal();
Panel2.Caption:='Н';
Panel7.Caption:='Н';
k:=k+1;
k:=k+1;end;
if ((sl=3)or(sl=4)or(sl=5)) then begin
Form4.ShowModal();end;
if (k=6) then begin
if (sl=1) then ShowMessage('Вы абсолютно верно ответили РЕНКИН');
if (sl=2) then ShowMessage('Вы абсолютно верно ответили НЬЮТОН');
if (sl=3) then ShowMessage('Вы абсолютно верно ответили ЛЮБОВЬ');
if (sl=4) then ShowMessage('Вы абсолютно верно ответили АЗБУКА');
if (sl=5) then ShowMessage('Вы абсолютно верно ответили ДОЛОТО');
Form5.ShowModal();
end;end;
if (RadioButton2.Visible=false) then
Label3.Caption:=Label3.Caption+'Н';
v:=v+1;
if (v>15) then Form10.ShowModal();
end;
procedure TForm2.Button16Click(Sender: TObject);
begin
if (RadioButton2.Visible=true) then begin
if ((sl=1)or(sl=4)) then
Form4.ShowModal();
if (sl=2)then begin
Panel8.Caption:=IntToStr(StrToInt(Panel8.Caption)+StrToInt(Form6.Panel1.Caption));
Form3.ShowModal();
Panel6.Caption:='O';
k:=k+1;
end;
if (sl=3) then begin
Panel8.Caption:=IntToStr(StrToInt(Panel8.Caption)+StrToInt(Form6.Panel1.Caption));
Form3.ShowModal();
Panel5.Caption:='O';
k:=k+1;
end;
if (sl=5) then begin
Panel8.Caption:=IntToStr(StrToInt(Panel8.Caption)+StrToInt(Form6.Panel1.Caption));
Panel8.Caption:=IntToStr(StrToInt(Panel8.Caption)+StrToInt(Form6.Panel1.Caption));
Panel8.Caption:=IntToStr(StrToInt(Panel8.Caption)+StrToInt(Form6.Panel1.Caption));
Form3.ShowModal();
Panel3.Caption:='O';
Panel5.Caption:='O';
Panel7.Caption:='O';
k:=k+3;
end;
if (k=6)then begin
if (sl=1) then ShowMessage('Вы абсолютно верно ответили РЕНКИН');
if (sl=2) then ShowMessage('Вы абсолютно верно ответили НЬЮТОН');
if (sl=3) then ShowMessage('Вы абсолютно верно ответили ЛЮБОВЬ');
if (sl=4) then ShowMessage('Вы абсолютно верно ответили АЗБУКА');
if (sl=5) then ShowMessage('Вы абсолютно верно ответили ДОЛОТО');
Form5.ShowModal();
end;
Button16.Enabled:=false;end;
if (RadioButton2.Visible=false) then
Label3.Caption:=Label3.Caption+'О';
v:=v+1;
if (v>15) then Form10.ShowModal();
end;
procedure TForm2.Button17Click(Sender: TObject);
begin
if (RadioButton2.Visible=true) then begin
Form4.ShowModal();
Button17.Enabled:=false; end;
if (RadioButton2.Visible=false) then
Label3.Caption:=Label3.Caption+'П';
v:=v+1;
if (v>15) then Form10.ShowModal();
end;
procedure TForm2.Button18Click(Sender: TObject);
begin
if (RadioButton2.Visible=true) then begin
if (sl=1) then begin
Panel8.Caption:=IntToStr(StrToInt(Panel8.Caption)+StrToInt(Form6.Panel1.Caption));
Form3.ShowModal();
Panel2.Caption:='P';
k:=k+1;end;
if ((sl=2)or(sl=3)or(sl=4)or(sl=5)) then begin
Form4.ShowModal();end;
Button18.Enabled:=false;
if (k=6) then begin
if (sl=1) then ShowMessage('Вы абсолютно верно ответили РЕНКИН');
if (sl=2) then ShowMessage('Вы абсолютно верно ответили НЬЮТОН');
if (sl=3) then ShowMessage('Вы абсолютно верно ответили ЛЮБОВЬ');
if (sl=4) then ShowMessage('Вы абсолютно верно ответили АЗБУКА');
if (sl=5) then ShowMessage('Вы абсолютно верно ответили ДОЛОТО');
Form5.ShowModal();
end;end;
if (RadioButton2.Visible=false) then
Label3.Caption:=Label3.Caption+'Р';
v:=v+1;
if (v>15)then Form10.ShowModal();
end;
procedure TForm2.Button19Click(Sender: TObject);
begin
if (RadioButton2.Visible=true) then begin
Form4.ShowModal();
Button19.Enabled:=false;end;
if (RadioButton2.Visible=false) then
Label3.Caption:=Label3.Caption+'С';
v:=v+1;
if (v>15)then Form10.ShowModal();
end;
procedure TForm2.Button20Click(Sender: TObject);
begin
if (RadioButton2.Visible=true) then begin
if ((sl=1)or(sl=3)or(sl=4))then begin
Form4.ShowModal(); end;
if (sl=2)then begin
Panel8.Caption:=IntToStr(StrToInt(Panel8.Caption)+StrToInt(Form6.Panel1.Caption));
Form3.ShowModal();
Panel5.Caption:='T';
k:=k+1;
end;
if (sl=5)then begin
Panel8.Caption:=IntToStr(StrToInt(Panel8.Caption)+StrToInt(Form6.Panel1.Caption));
Form3.ShowModal();
Panel6.Caption:='T';
k:=k+1;
end;
if (k=6)then begin
if (sl=1) then ShowMessage('Вы абсолютно верно ответили РЕНКИН');
if (sl=2) then ShowMessage('Вы абсолютно верно ответили НЬЮТОН');
if (sl=3) then ShowMessage('Вы абсолютно верно ответили ЛЮБОВЬ');
if (sl=4) then ShowMessage('Вы абсолютно верно ответили АЗБУКА');
if (sl=5) then ShowMessage('Вы абсолютно верно ответили ДОЛОТО');
Form5.ShowModal();
end;
Button20.Enabled:=false;end;
if (RadioButton2.Visible=false) then
Label3.Caption:=Label3.Caption+'Т';
v:=v+1;
if (v>15)then Form10.ShowModal();
end;
procedure TForm2.Button21Click(Sender: TObject);
begin
if (RadioButton2.Visible=true) then begin
if ((sl=1)or(sl=2)or(sl=3)or(sl=5))then begin
Form4.ShowModal(); end;
Button21.Enabled:=false;
if (sl=4)then begin
Panel8.Caption:=IntToStr(StrToInt(Panel8.Caption)+StrToInt(Form6.Panel1.Caption));
Form3.ShowModal();
Panel5.Caption:='У';
k:=k+1;
end;
if (k=6)then begin
if (sl=1) then ShowMessage('Вы абсолютно верно ответили РЕНКИН');
if (sl=2) then ShowMessage('Вы абсолютно верно ответили НЬЮТОН');
if (sl=3) then ShowMessage('Вы абсолютно верно ответили ЛЮБОВЬ');
if (sl=4) then ShowMessage('Вы абсолютно верно ответили АЗБУКА');
if (sl=5) then ShowMessage('Вы абсолютно верно ответили ДОЛОТО');
Form5.ShowModal();
end;end;
if (RadioButton2.Visible=false) then
Label3.Caption:=Label3.Caption+'У';
v:=v+1;
if (v>15)then Form10.ShowModal();
end;
procedure TForm2.Button22Click(Sender: TObject);
begin
if (RadioButton2.Visible=true) then begin
Form4.ShowModal();
Button22.Enabled:=false;end;
if (RadioButton2.Visible=false) then
Label3.Caption:=Label3.Caption+'Ф';
v:=v+1;
if (v>15) then Form10.ShowModal();
end;
procedure TForm2.Button23Click(Sender: TObject);
begin
if (RadioButton2.Visible=true) then begin
Form4.ShowModal();
Button23.Enabled:=false; end;
if (RadioButton2.Visible=false) then
Label3.Caption:=Label3.Caption+'Х';
v:=v+1;
if (v>15) then Form10.ShowModal();
end;
procedure TForm2.Button24Click(Sender: TObject);
begin
if (RadioButton2.Visible=true) then begin
Form4.ShowModal();
Button24.Enabled:=false;end;
if (RadioButton2.Visible=false) then
Label3.Caption:=Label3.Caption+'Ц';
v:=v+1;
if (v>15) then Form10.ShowModal();
end;
procedure TForm2.Button25Click(Sender: TObject);
begin
if (RadioButton2.Visible=true) then begin
Form4.ShowModal();
Button25.Enabled:=false;end;
if (RadioButton2.Visible=false) then
Label3.Caption:=Label3.Caption+'Ч';
v:=v+1;
if (v>15)then Form10.ShowModal();
end;
procedure TForm2.Button26Click(Sender: TObject);
begin
if (RadioButton2.Visible=true) then begin
Form4.ShowModal();
Button26.Enabled:=false; end;
if (RadioButton2.Visible=false) then
Label3.Caption:=Label3.Caption+'Ш';
v:=v+1;
if (v>15) then Form10.ShowModal();
end;
procedure TForm2.Button27Click(Sender: TObject);
begin
if (RadioButton2.Visible=true) then begin
Form4.ShowModal();
Button27.Enabled:=false;end;
if (RadioButton2.Visible=false) then
Label3.Caption:=Label3.Caption+'Щ';
v:=v+1;
if (v>15)then Form10.ShowModal();
end;
procedure TForm2.Button28Click(Sender: TObject);
begin
if (RadioButton2.Visible=true) then begin
if ((sl=1)or(sl=4)or(sl=5))then begin
Form4.ShowModal(); end;
if (sl=2)then begin
Panel8.Caption:=IntToStr(StrToInt(Panel8.Caption)+StrToInt(Form6.Panel1.Caption));
Form3.ShowModal();
Panel3.Caption:='Ь';
k:=k+1;
end;
if (sl=3) then begin
Panel8.Caption:=IntToStr(StrToInt(Panel8.Caption)+StrToInt(Form6.Panel1.Caption));
Form3.ShowModal();
Panel7.Caption:='Ь';
k:=k+1;
end;
if (k=6)then begin
if (sl=1) then ShowMessage('Вы абсолютно верно ответили РЕНКИН');
if (sl=2) then ShowMessage('Вы абсолютно верно ответили НЬЮТОН');
if (sl=3) then ShowMessage('Вы абсолютно верно ответили ЛЮБОВЬ');
if (sl=4) then ShowMessage('Вы абсолютно верно ответили АЗБУКА');
if (sl=5) then ShowMessage('Вы абсолютно верно ответили ДОЛОТО');
Form5.ShowModal();
end;
Button28.Enabled:=false;end;
if (RadioButton2.Visible=false) then
Label3.Caption:=Label3.Caption+'Ь';
v:=v+1;
if (v>15) then Form10.ShowModal();
end;
procedure TForm2.Button29Click(Sender: TObject);
begin
if (RadioButton2.Visible=true) then begin
Form4.ShowModal();
Button29.Enabled:=false;end;
if (RadioButton2.Visible=false) then
Label3.Caption:=Label3.Caption+'Ы';
v:=v+1;
if (v>15)then Form10.ShowModal();
end;
procedure TForm2.Button30Click(Sender: TObject);
begin
if (RadioButton2.Visible=true) then begin
Form4.ShowModal();
Button30.Enabled:=false;end;
if (RadioButton2.Visible=false) then
Label3.Caption:=Label3.Caption+'Ъ';
v:=v+1;
if (v>15) then Form10.ShowModal();
end;
procedure TForm2.Button31Click(Sender: TObject);
begin
if (RadioButton2.Visible=true) then begin
Form4.ShowModal();
Button31.Enabled:=false;end;
if (RadioButton2.Visible=false) then
Label3.Caption:=Label3.Caption+'Э';
v:=v+1;
if (v>15)then Form10.ShowModal();
end;
procedure TForm2.Button32Click(Sender: TObject);
begin
if (RadioButton2.Visible=true) then begin
if ((sl=1)or(sl=4)or(sl=5)) then
Form4.ShowModal();
if (sl=2)then begin
Panel8.Caption:=IntToStr(StrToInt(Panel8.Caption)+StrToInt(Form6.Panel1.Caption));
Form3.ShowModal();
Panel4.Caption:='Ю';
k:=k+1;
end;
if (sl=3)then begin
Panel8.Caption:=IntToStr(StrToInt(Panel8.Caption)+StrToInt(Form6.Panel1.Caption));
Form3.ShowModal();
Panel3.Caption:='Ю';
k:=k+1;
end;
if (k=6)then begin
if (sl=1) then ShowMessage('Вы абсолютно верно ответили РЕНКИН');
if (sl=2) then ShowMessage('Вы абсолютно верно ответили НЬЮТОН');
if (sl=3) then ShowMessage('Вы абсолютно верно ответили ЛЮБОВЬ');
if (sl=4) then ShowMessage('Вы абсолютно верно ответили АЗБУКА');
if (sl=5) then ShowMessage('Вы абсолютно верно ответили ДОЛОТО');
Form5.ShowModal();
end;
Button32.Enabled:=false;end;
if (RadioButton2.Visible=false) then
Label3.Caption:=Label3.Caption+'Ю';
v:=v+1;
if (v>15)then Form10.ShowModal();
end;
procedure TForm2.Button33Click(Sender: TObject);
begin
if (RadioButton2.Visible=true) then begin
Form4.ShowModal();
Button33.Enabled:=false;end;
if (RadioButton2.Visible=false) then
Label3.Caption:=Label3.Caption+'Я';
v:=v+1;
if (v>15) then Form10.ShowModal();
end;
end.
Пример формы, оповещающей о наличии буквы в слове;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Подобные документы
Предмет объектно-ориентированного программирования и особенности его применения в средах Паскаль, Ада, С++ и Delphi. Интегрированная среда разработки Delphi: общее описание и назначение основных команд меню. Процедуры и функции программы Delphi.
курсовая работа [40,8 K], добавлен 15.07.2009Характеристика базовых конструкций языков программирования. Изучение истории их развития и классификации. Определение основных понятий языков программирования. Описание основных операторов, которые используются в языках программирования высокого уровня.
курсовая работа [400,6 K], добавлен 10.11.2016Методы численного интегрирования. Характеристика основных составляющих структурного программирования. Решение задания на языке высокого уровня Паскаль. Построение графического решения задачи в пакете Matlab. Решение задания на языке высокого уровня C.
курсовая работа [381,7 K], добавлен 10.05.2018Сравнительный анализ наиболее распространенных языков, их классификация, описание достоинств и недостатков. Использование процедур, функции и подпрограмм в языках программирования высокого уровня. Разработка и реализация программы "Бортовой компьютер".
курсовая работа [329,8 K], добавлен 22.06.2014Сравнительный анализ языков программирования высокого уровня Си и Паскаль. Реализация алгоритма обработки данных. Тестирование и отладка программы или пакета программ. Структура программы на языке Турбо Паскаль. Указатели и векторные типы данных.
курсовая работа [233,5 K], добавлен 14.12.2012Особенности разработки приложений для операционной системы с помощью императивного, структурированного, объектно-ориентированного языка программирования Delphi. Формальное начало программы. Выделение конца программного блока. Листинг и описание программы.
курсовая работа [1,2 M], добавлен 04.08.2014Сравнительный анализ языков программирования высокого уровня Си и Паскаль: структура программы, типы данных, арифметические операции, операторы ветвления и циклы. Создание программы поиска подпоследовательностей одинаковых элементов в множественном виде.
курсовая работа [78,9 K], добавлен 28.12.2012Классификация языков программирования. Использование циклических конструкций и выполнение итерационных процессов. Алгоритмические структуры циклов языков C, C++, Java, C#. Особенности современных языков программирования высокого уровня и их применение.
курсовая работа [345,6 K], добавлен 13.11.2009Этапы написания программы на четырех языках программирования (Turbo Pascal 7.0, Borland C++ 3.11, Delphi 7, Builder C++ 6.0), которая выводит на экран имя и фамилию студента, используя стандартные средства графики и простейшие геометрические фигуры.
контрольная работа [1,4 M], добавлен 05.06.2010Borland Delphi 7 как универсальный инструмент разработки, применяемый во многих областях программирования, функции: добавление информации об абитуриентах в базу данных, формирование отчетов. Рассмотрение и характеристика основных компонентов Delphi.
контрольная работа [3,6 M], добавлен 18.10.2012