I'm rewriting a VB program in Delphi. The VB Program uses a SendKeys 'Alt-FOTEST.TXT-Enter' to open a File Open Dialog, and to introduce the Filename 'TEST.TXT', followed by a ENTER.
I'm using PostMessage Functions to get the FIle Open Dialog, but if i then Use PostMessage, with the handle of the currently active window (the file open dialog), the messages (characters) are not sent to the active Edit Box of this window. I can, however, via GetNextWindow get hold of the handle of this edit box, and then send these Postmessage's. This works fine, but it makes my function not general. How does VB know what the handle is of the active object on the active window, or what technique does VB use to send these keystrokes to the active object of the active window ?