Guest:
Register
|
Login
|
Member List
|
Search
|
Statistics
|
FAQ
Language
----------
Simplifed Chinese
Traditional Chinese
English
CnPack Forum
»
CnWizards IDE Wizards
» unit CnRawInput x {$I CnPack.inc}
‹‹ Last Thread
|
Next Thread ››
Poll
Trade
Reward
Activity
Printable Version
|
Email to Friend
|
Subscription
|
Favorites
Subject: unit CnRawInput x {$I CnPack.inc}
mapasoal
新警察
UID 50200
Digest Posts 0
Credits 4
Posts 1
点点分 4
Reading Access 10
Registered 2010-8-2
Status Offline
#1
Post at 2010-8-3 00:00
Profile
|
Blog
|
P.M.
unit CnRawInput x {$I CnPack.inc}
Dears,
I'm new in the programing world but I always study to understand the Delphi 7, that I use at home.
I read this website link about, how to identify who keyboard sent data by USB conection:
Using Raw Input from C# to handle multiple keyboards
http://www.codeproject.com/KB/system/rawinput.aspx
How this article is for C# and was using the google to find some thing for Delhpi 7 to help me.
I found the unit CnRawInput and in my project I have only 1 Form and the 2 Units: U_MainForm.pas and U_CnRawInput.pas.
after download the Rawinput.pas file I don't know how to use it ? I see there are functions:
procedure RegisterRawInput;
function GetKeyBoardCount: Integer;
procedure SetEnabled(const Value: Boolean);
procedure SetBackground(const Value: Boolean);
function GetKeyBoardName(Index: Integer): string;
Is there a corect sequency to call them ?
I was reading that I need create a procedure in the MainForm as
procedure WMINput(var MSG :TMessage); message WM_INPUT;
and into it I have to write:
procedure TForm1.WMINput(var MSG: TMessage);
begin
if GetKeyBoardName(1) = 'KeyBoard1' then
//let normal data flow
else
if GetKeyBoardName(2) = 'KeyBoard2' then
panel.caption := //keboard data
end;
So I need a Data Flow Control to know if the data came form a keyboard let it normal flow if not get the data and keep it.
My keboard and BarCode Reader are in the USB pluged, and all BarCode Reader simulates a keboard; if my application can be hiden and only its icon is displayed in the TraySystem field of the screen there will be no problem if I use the notepad and a code was read from the Reader because the data will have other flow, so no conflicts.
When I try do use the unit as I wrote above occured an error {$I CnPack.inc}
Who can help me ?
allensmith
新警察
UID 191789
Digest Posts 0
Credits 4
Posts 2
点点分 4
Reading Access 10
Registered 2015-1-19
Status Offline
#2
Post at 2015-1-27 14:59
Profile
|
Blog
|
P.M.
re:
I met the same problem.
allensmith
新警察
UID 191789
Digest Posts 0
Credits 4
Posts 2
点点分 4
Reading Access 10
Registered 2015-1-19
Status Offline
#3
Post at 2015-1-27 15:04
Profile
|
Blog
|
P.M.
re:
I met the same problem. I can't understand the error {$I CnPack.inc},i search it in Google but still can't find the answer.Really disgusting!
2 of 5 barcode
2 of 5 barcode
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
#4
Post at 2015-1-27 16:34
Profile
|
Blog
|
P.M.
Could you refer to the example in cnvcl/Examples/RawInput?
Poll
Trade
Reward
Activity
CnPack Forum
CnPack English Forum
> CnWizards IDE Wizards
> CVSTracNT
> Announcements & Others
All times are GMT++8, the time now is 2024-11-24 10:17
Powered by
Discuz!
5.0.0
© 2001-2006
Comsenz Inc.
Processed in 0.014326 second(s), 9 queries , Gzip enabled
TOP
Clear Cookies
-
Contact Us
-
CnPack Website
-
Archiver
-
WAP
Member's CP Home
Edit Profile
Credits Transaction
Public User Groups
Buddy List
Main
Page Views
User Agents
Posts History
Top Forums
Top Threads
Post Ranking
Credit Ranking
Online Time
Team
Moderation Stats