Hola.
Intenta de este modo:
.h
Código PHP:
...
class TForm1 : public TForm
{
__published: // IDE-managed Components
TEdit *Edit1;
TEdit *Edit2;
TEdit *Edit3;
TEdit *edCenso;
void __fastcall edCensoExit(TObject *Sender);
private: // User declarations
void __fastcall CMDialogKey(TWMKey& msg);
BEGIN_MESSAGE_MAP
MESSAGE_HANDLER(CM_DIALOGKEY, TWMKey, CMDialogKey)
END_MESSAGE_MAP(TForm)
public: // User declarations
__fastcall TForm1(TComponent* Owner);
};
...
.cpp
Código PHP:
...
bool Valida = true;
void __fastcall TForm1::edCensoExit(TObject *Sender)
{
if (Valida)
ShowMessage("SE VALIDA");
else
ShowMessage("NO SE VALIDA");
}
void __fastcall TForm1::CMDialogKey(TWMKey& msg)
{
Valida = !(msg.CharCode == VK_TAB && GetKeyState(VK_SHIFT) < 0);
TForm::Dispatch(&msg);
}
Saludos