Dear yontal:
On Saturday, December 3, 2016 at 8:02:52 PM UTC-7, yontal wrote:
> On Friday, December 2, 2016 at 3:05:49 PM UTC-5, dlzc wrote:
reorganized your response, so it flows better with the questions asked.
...
> > Have you asked on a Delphi newsgroup?
>
> I don't thing this is a Delphi issue if I
> have notepad.exe as the top program it is
> getting the ALT keys (ALT-F would open the
> file menu).
OK.
> > What OS is running? What else is running,
> > that might be intercepting ALT+key
> > characters?
>
> Running windows 7
... and what about other programs running? Are you sure that you made the xHarbour executable window primary, when trying to transmit the alt key sequence to it?
https://support.microsoft.com/en-us/kb/126449
> > What does the receiving code look like in
> > xHarbour? Do you have any keyboard traps set?
>
> I would take a look at the xHarbour code however
> I dont this ALT is treated differently then lets
> say CNTRL
It would be if extended characters is not turned on when it is compiled.
#define HB_INKEY_EXTENDED
> > Can you push your commands to a transaction
> > file "from" Delphi, and when xHarbour can get
> > exclusive access to a pre-existing file, it
> > performs the requested operation?
>
> Im not sure what you mean with a "transaction file"
Delphi could check for the existence of a file "COMMAND.2XH". If it did not exist, the last command was completed. You could create this file, push in the instructions you want executed. Then close the file.
xHarbour could check for the existence of the file "COMMAND.2XH". If it didn't exist, continue waiting. If it does exist, can it obtain an exclusive lock on the file? If no, continue waiting. If yes, process the command, release the lock, delete the file "COMMAND.2XH", then return to wait.
This way xHarbour can run in the background, no other application can capture / steal its intended keystrokes, and xHarbour window never has to be "on top" to get the message.
David A. Smith