🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #16192

Virtual Key problem

#16192
From: Nicholas Gessler
Date: Mon, 26 May 2003 02:28
17 lines
1671 bytes
I am puzzled...
I have used KeyDown VK code in other applications and they all work:

void __fastcall TForm1::FormKeyDown(TObject *Sender, WORD &Key,
      TShiftState Shift)
{
   Form1->Color = clRed;
   if (Key == VK_LEFT) Form1->Color = clWhite; direction = 3;
   if (Key == VK_RIGHT) Form1->Color = clBlue; direction = 1;
   if (Key == VK_UP) Form1->Color = clGreen; direction = 0;
   if (Key == VK_DOWN) Form1->Color = clYellow; direction = 2;
}

But now, for some reason that escapes me, KeyDown is detected (since the
form turns Red), but the arrow keys just don't do anything...  I am stumped!

Nick
Technical Details
Message-ID: <3ed17b8f@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-01!sn-xit-09!supernews.com!news-out.visi.com!petbe.visi.com!out.nntp.be!propagator2-sterling!news-in-sterling.newsfeed.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,b34f1e4dec3a67c2,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-05-25 19:30:40 PST
Reply-To: "Nicholas Gessler" <gessler@ucla.edu>
From: "Nicholas Gessler" <gessler@ucla.edu>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Virtual Key problem
Date: Sun, 25 May 2003 19:28:55 -0700
Lines: 19
Organization: UCLA - Geography
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 4.60.108.106
Message-ID: <3ed17b8f@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1053916047 4.60.108.106 (25 May 2003 19:27:27 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-01!sn-xit-09!supernews.com!news-out.visi.com!petbe.visi.com!out.nntp.be!propagator2-sterling!news-in-sterling.newsfeed.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail