void __fastcall TForm1::btn4Click(TObject *Sender) { /* 模拟CTRL + + 符号消息 */ redt1->SetFocus(); keybd_event(VK_CONTROL,0,0,0); keybd_event(187,0,0,0); keybd_event(187,0,KEYEVENTF_KEYUP,0); keybd_event(VK_CONTROL,0,KEYEVENTF_KEYUP,0); } //--------------------------------------------------------------------------- void __fastcall TForm1::redt1KeyDown(TObject *Sender, WORD &Key, TShiftState Shift) { mmo1->Lines->Add(IntToStr(Key)); } //--------------------------------------------------------------------------- void __fastcall TForm1::btn6Click(TObject *Sender) { /* 模拟 CTRL + SHIFT + + 符号消息 */ redt1->SetFocus(); keybd_event(VK_CONTROL,0,0,0); keybd_event(VK_SHIFT,0,0,0); keybd_event(187,0,0,0); keybd_event(187,0,KEYEVENTF_KEYUP,0); keybd_event(VK_SHIFT,0,KEYEVENTF_KEYUP,0); keybd_event(VK_CONTROL,0,KEYEVENTF_KEYUP,0); }