请问一个关于输入特殊字符的问题
比如有个窗体Form1,Caption为“A”,窗体上有个Edit1,我想实现在Edit1里按顺序按下键盘上的特殊字符“上下左右”键后,Form1的Caption变为“B”,请问应该怎么实现?万分感谢!
[解决办法]
void __fastcall TForm1::Edit1KeyUp(TObject *Sender, WORD &Key, TShiftState Shift){ static nFlag = 0; if (Key == VK_UP && nFlag == 0) nFlag = 1; else if (Key == VK_DOWN && nFlag == 1) nFlag = 2; else if (Key == VK_LEFT && nFlag == 2) nFlag = 4; else if (Key == VK_RIGHT && nFlag == 4) nFlag = 8; else nFlag = 0; Caption = nFlag == 8? "B": "A";}