cels9
asked on
Storing informations in keybord keys ctrl
Hi,
How storage a text in a specificate key(for exemple: ctrl + Y), and when i press it, paste the text, in a form, for exemple. tnx
How storage a text in a specificate key(for exemple: ctrl + Y), and when i press it, paste the text, in a form, for exemple. tnx
ASKER
these topics doenst matchs with my q. but, tnx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ohh.. sorry. im newb :P tnx! and if i wanna ctrl + F ? :))
if RegisterHotKey(Handle,2, MOD_CONTROL ,ord('f')) = false then
MessageDlg('Failed to register Hot Key',mtError,[mbOk],0);
procedure TForm1.WMHotkey( Var msg: TWMHotkey );
Begin
If msg.hotkey = 1 Then
Begin
//paste the text you want to paste where you want to paste it!
// example
//edit1.text:= SomeText;
End
else
If msg.hotkey = 2 Then
Begin
//paste the text you want to paste where you want to paste it!
// example
//edit1.text:= SomeText;
End
End;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
UnRegisterHotkey( Form1.Handle, 2 );
end;
MessageDlg('Failed to register Hot Key',mtError,[mbOk],0);
procedure TForm1.WMHotkey( Var msg: TWMHotkey );
Begin
If msg.hotkey = 1 Then
Begin
//paste the text you want to paste where you want to paste it!
// example
//edit1.text:= SomeText;
End
else
If msg.hotkey = 2 Then
Begin
//paste the text you want to paste where you want to paste it!
// example
//edit1.text:= SomeText;
End
End;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
UnRegisterHotkey( Form1.Handle, 2 );
end;
ASKER
tnx again
NP
<SMILE>
Happy Coding!
Shane
<SMILE>
Happy Coding!
Shane
https://www.experts-exchange.com/questions/20943169/HOTKEY-FOR-MY-APPLICATION.html?query=HotKey&searchType=topic
https://www.experts-exchange.com/questions/20398171/implementing-hotkey.html?query=HotKey&searchType=topic
Shane