Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6617457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:42:26+00:00 2026-05-25T20:42:26+00:00

When a Delphi Form is declared and instantiated inside a DLL and the DLL

  • 0

When a Delphi Form is declared and instantiated inside a DLL and the DLL loaded by the host application, Arrow and Tab keys are not passed across the Host/DLL boundary. This means that TEdit boxes and TMemo controls that may be used on the form will not respond to these key strokes. Is there anyway to ensure that these key strokes are passed from the main application form to the form in the dll? Note there may be multiple DLLs, each containing a form. KeyPreview makes no difference.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T20:42:26+00:00Added an answer on May 25, 2026 at 8:42 pm

    Forms in DLL’s miss this support, as well as support of menu shortcuts (actions). You can write some code to simulate this behaviour.

    ////////////////////////////////////////////////////////////////
    // If you display a form from inside a DLL/COM server, you will miss
    // the automatic navigation between the controls with the "TAB" key.
    // The "KeyPreview" property of the form has to be set to "True".
    procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char);
    var
      bShift: Boolean;
    begin
      // Check for tab key and switch focus to next or previous control.
      // Handle this in the KeyPress event, to avoid a messagebeep.
      if (Ord(Key) = VK_TAB) then
      begin
        bShift := Hi(GetKeyState(VK_SHIFT)) <> 0;
        SelectNext(ActiveControl, not(bShift), True);
        Key := #0; // mark as handled
      end;
    end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Delphi form inside a DLL (I know that this restricts the
I have a Delphi application that has a document browser as the main form.
The tab order on my form in Delphi (Embarcadero® Delphi® 2010 Version 14.0) is
I have a Delphi DLL that houses a form which uses a variety of
How to run a console application from a standard Delphi form application, but to
Is there a way to get CreateOleObject to work in a Delphi Form Application?
Which physical file stores the main form name for a Delphi application? e.g. MyApplication
I have a delphi 7 form: and my code: when I run this form
I need a Timer in a 'no form' Delphi unit (there's still a main
Does that mean that I can't share a Form between delphi 2007 and 2009?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.