Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
How to change the decimal point on a numerical keypad to a comma Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
01-Oct-02
Category
Win API
Language
Delphi 2.x
Views
115
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			 Author: Jonas Bilinkevicius

Is there a way to change the decimal point (.) on the numeric keypad to a comma (,) 
on the application level?

Answer:

You can use a handler for the Application.OnMessage event. Changing the decimal 
separator produced by numpad globally:
1   
2   procedure TForm1.AppOnMessage(var Msg: TMsg; var Handled: Boolean);
3   begin
4     case Msg.message of
5       WM_KEYDOWN, WM_KEYUP:
6         if (Msg.wparam = VK_DECIMAL) and (Odd(GetKeyState(VK_NUMLOCK))) then
7         begin
8           Msg.wparam := 190; { for point, use 188 for comma }
9           Msg.lparam := MakeLParam(LoWord(msg.lparam), (HiWord(Msg.lparam)
10            and $FE00) + MapVirtualKey(Msg.wparam, 0));
11        end;
12    end;
13  end;


			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC