|
일반 어플리케이션을 Active Form으로 전환하는데...
원래 제작된 프로그램을 component Template으로 생성해서 사용했는데...
다른 이벤트는 되는데.. 이벤트 중에 KeyDown과 KeyUp을 동작하지 않는군여...
일반 어플리케이션에서는 잘 동작 했거든여......
어찌 해야 할지 .........난감합니다........
고수님들의 도움을 간곡히.....원합니다....ㅠ.ㅠ............
넘 허접 같은 질문이라고..................차분한 맘으로 갈켜 주세여...ㅠ.ㅠ
void __fastcall Tfctl::ActiveFormKeyDown(TObject *Sender, WORD &Key,
TShiftState Shift)
{
unsigned char tmpc[2];
t = 0;
if(ClientSocket3->Socket->Connected==false) return;
if(Key == 37 || Key == 38 || Key == 39 || Key == 40)
{
keybd_event(144,0,0,0);
keybd_event(144,0,KEYEVENTF_KEYUP,0);
}
tmpc[0]='D';
tmpc[1]=(unsigned char)Key;
ClientSocket3->Socket->SendBuf(tmpc,2);
}
//---------------------------------------------------------------------------
void __fastcall Tfctl::ActiveFormKeyUp(TObject *Sender, WORD &Key,
TShiftState Shift)
{
unsigned char tmpc[2];
if(ClientSocket3->Socket->Connected==false) return;
t = 0;
tmpc[0]='U';
tmpc[1]=(unsigned char)Key;
ClientSocket3->Socket->SendBuf(tmpc,2);
}
//---------------------------------------------------------------------------
|