Wednesday, July 16, 2008

Page Up and Page Down Shortcut Key

First set the Form-> KeyPreview to true, and write the following form event:

void __fastcall TProductForm::FormKeyDown(TObject *Sender, WORD &Key, TShiftState Shift)
{
if(Key==VK_PRIOR)
{
Key=0;
prevActionExecute(this);
}
else if(Key==VK_NEXT)
{
Key=0;
nextActionExecute(this);
}
}

No comments: