//=========================================================================== // NICOLAS BION CIPHER DISK //=========================================================================== //--------------------------------------------------------------------------- #include #pragma hdrstop #include "Unit1.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TForm1 *Form1; //=========================================================================== // VARIABLES //=========================================================================== int x = 97; int y = 76; //=========================================================================== // FUNCTIONS //=========================================================================== //=========================================================================== // EVENT HANDLERS //=========================================================================== //--------------------------------------------------------------------------- __fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner) { Form1->Image1->Visible = true; Form1->Image1->Top = y; Form1->Image1->Left = x; Form1->Image2->Top = y; Form1->Image2->Left = x; Form1->Image3->Top = y; Form1->Image3->Left = x; Form1->Image4->Top = y; Form1->Image4->Left = x; Form1->Image5->Top = y; Form1->Image5->Left = x; Form1->Image6->Top = y; Form1->Image6->Left = x; Form1->Image7->Top = y; Form1->Image7->Left = x; Form1->Image8->Top = y; Form1->Image8->Left = x; Form1->Image9->Top = y; Form1->Image9->Left = x; Form1->Image10->Top = y; Form1->Image10->Left = x; Form1->Image11->Top = y; Form1->Image11->Left = x; Form1->Image12->Top = y; Form1->Image12->Left = x; Form1->Image13->Top = y; Form1->Image13->Left = x; Form1->Image14->Top = y; Form1->Image14->Left = x; Form1->Image15->Top = y; Form1->Image15->Left = x; Form1->Image16->Top = y; Form1->Image16->Left = x; Form1->Image17->Top = y; Form1->Image17->Left = x; Form1->Image18->Top = y; Form1->Image18->Left = x; Form1->Image19->Top = y; Form1->Image19->Left = x; Form1->Image20->Top = y; Form1->Image20->Left = x; Form1->Image21->Top = y; Form1->Image21->Left = x; Form1->Image22->Top = y; Form1->Image22->Left = x; Form1->Image23->Top = y; Form1->Image23->Left = x; Form1->Image24->Top = y; Form1->Image24->Left = x; } //--------------------------------------------------------------------------- void __fastcall TForm1::TrackBar1Change(TObject *Sender) { int which = TrackBar1->Position; if (which > 24) which = which - 24; if (which > 24) which = which - 24; if (which > 24) which = which - 24; Form1->Edit1->Text = which; Form1->Image1->Visible = false; Form1->Image2->Visible = false; Form1->Image3->Visible = false; Form1->Image4->Visible = false; Form1->Image5->Visible = false; Form1->Image6->Visible = false; Form1->Image7->Visible = false; Form1->Image8->Visible = false; Form1->Image9->Visible = false; Form1->Image10->Visible = false; Form1->Image11->Visible = false; Form1->Image12->Visible = false; Form1->Image13->Visible = false; Form1->Image14->Visible = false; Form1->Image15->Visible = false; Form1->Image16->Visible = false; Form1->Image17->Visible = false; Form1->Image18->Visible = false; Form1->Image19->Visible = false; Form1->Image20->Visible = false; Form1->Image21->Visible = false; Form1->Image22->Visible = false; Form1->Image23->Visible = false; Form1->Image24->Visible = false; if (which == 1) Form1->Image1->Visible = true; if (which == 2) Form1->Image2->Visible = true; if (which == 3) Form1->Image3->Visible = true; if (which == 4) Form1->Image4->Visible = true; if (which == 5) Form1->Image5->Visible = true; if (which == 6) Form1->Image6->Visible = true; if (which == 7) Form1->Image7->Visible = true; if (which == 8) Form1->Image8->Visible = true; if (which == 9) Form1->Image9->Visible = true; if (which == 10) Form1->Image10->Visible = true; if (which == 11) Form1->Image11->Visible = true; if (which == 12) Form1->Image12->Visible = true; if (which == 13) Form1->Image13->Visible = true; if (which == 14) Form1->Image14->Visible = true; if (which == 15) Form1->Image15->Visible = true; if (which == 16) Form1->Image16->Visible = true; if (which == 17) Form1->Image17->Visible = true; if (which == 18) Form1->Image18->Visible = true; if (which == 19) Form1->Image19->Visible = true; if (which == 20) Form1->Image20->Visible = true; if (which == 21) Form1->Image21->Visible = true; if (which == 22) Form1->Image22->Visible = true; if (which == 23) Form1->Image23->Visible = true; if (which == 24) Form1->Image24->Visible = true; } //---------------------------------------------------------------------------