[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Storing informations in keybord keys ctrl

Posted on 2004-04-23
7
Medium Priority
?
202 Views
Last Modified: 2010-04-05
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
0
Comment
Question by:cels9
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 

Author Comment

by:cels9
ID: 10909188
these topics doenst matchs with my q. but, tnx
0
 
LVL 11

Accepted Solution

by:
shaneholmes earned 2000 total points
ID: 10909259
What part doesn't answer your question?

You register the key sequence (Ctrl + Y)


when its pressed, you can assign it to do what you want - in your case put some text somewhere



  private
    { Private declarations }
    Procedure WMHotkey( Var msg: TWMHotkey ); message WM_HOTKEY;





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;
  End;

procedure TForm1.FormCreate(Sender: TObject);
begin
if RegisterHotKey(Handle,1, MOD_CONTROL ,ord('Yy)) = false then
      MessageDlg('Failed to register Hot Key',mtError,[mbOk],0);
end;

procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  UnRegisterHotkey( Form1.Handle, 1 );
end;

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:cels9
ID: 10909471
ohh.. sorry. im newb :P tnx! and if i wanna ctrl + F ? :))
0
 
LVL 11

Expert Comment

by:shaneholmes
ID: 10909481
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;
0
 

Author Comment

by:cels9
ID: 10909529
tnx again
0
 
LVL 11

Expert Comment

by:shaneholmes
ID: 10909539
NP

<SMILE>

Happy Coding!

Shane
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question