//--------------------------------------------------------------------------- #include #pragma hdrstop #include "LogInWindow.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TForm_LogIn *Form_LogIn; //--------------------------------------------------------------------------- __fastcall TForm_LogIn::TForm_LogIn(TComponent* Owner) : TForm(Owner) { ComponentInit(); } //--------------------------------------------------------------------------- void TForm_LogIn::ComponentInit() { /// Form Event OnClose = FormClose; /// Edit_ID Event & Properties Edit_ID->OnKeyPress = Edit_IDKeyPress; /// Edit_Password Event & Properties Edit_Password->PasswordChar = true; Edit_Password->OnKeyPress = Edit_PasswordKeyPress; } //--------------------------------------------------------------------------- void __fastcall TForm_LogIn::FormClose(TObject *Sender, TCloseAction &Action) { Action = caFree; } //--------------------------------------------------------------------------- void __fastcall TForm_LogIn::Edit_PasswordKeyPress(TObject *Sender, char &Key) { switch( Key ) { case VK_RETURN : { RequestLogIn(); break; } case VK_ESCAPE : { Close(); break; } } } //--------------------------------------------------------------------------- void TForm_LogIn::RequestLogIn() { } //--------------------------------------------------------------------------- void __fastcall TForm_LogIn::Edit_IDKeyPress(TObject *Sender, char &Key) { switch( Key ) { case VK_RETURN : { Key = 0; SelectNext( ActiveControl, True, True ); break; } case VK_ESCAPE : { Close(); break; } } } //---------------------------------------------------------------------------