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 7662985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:56:29+00:00 2026-05-31T13:56:29+00:00

I use ActivateKeyboardLayout(HKL_NEXT, KLF_ACTIVATE); to load Persian keyboard layout using Delphi XE2, But sometimes

  • 0

I use ActivateKeyboardLayout(HKL_NEXT, KLF_ACTIVATE); to load Persian keyboard layout using Delphi XE2, But sometimes I click on TextBox or DbGrid control the keyboard automatically is changed to English layout.

How can I disable automatic changing of keyboard layout?

  • 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-31T13:56:31+00:00Added an answer on May 31, 2026 at 1:56 pm

    We have same issues. This bug appeared after upgrade from D2006 to D2010.

    Issue is in DBGrids.pas:

    procedure TCustomDBGrid.WMKillFocus(var Message: TMessage);
    begin
      ImeName := Screen.DefaultIme;
      ImeMode := imDontCare;
      inherited;
      if not ((InplaceEditor <> nil) and
        (HWND(Message.WParam) = InplaceEditor.Handle)) then
        ActivateKeyboardLayout(Screen.DefaultKbLayout, KLF_ACTIVATE);
    end;
    

    I have no idea why Borland/Embarcadero added “if block” after inherited. Change causes switching keyboard layout back to default. We had to copy DBGrids to our projects and remove “if block”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

use a reapeter to display data, but sometimes the data is to big to
Use case: user clicks the link on a webpage - boom! load of files
use this website a lot but first time posting. My program creates a number
Use AES/Rijndael or any symmetric encryption. Encrypt the hidden value using itself as the
I use C++ Builder 2010 and I could'nt figure out how to change keyboard
Use http://jobs.sitesixteen.com/ for reference. I'm using YQL for the city, state auto-complete. IF you
Use case: we have some project meta-data files which we want tracked, but are
Use new MediaPlayer by Yahoo. Content parse automatic - greate, but I use ajax
use Service layer to persist data into database. But the Unit Test does not
Use of rails 3 recaptcha. In view _form.html.erb insert <%= recaptcha_tags %> But when

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.