|
-
Jun 9th, 2008, 06:00 AM
#1
Thread Starter
Addicted Member
[2008] Binding Keys
so if you press the Tab key, you move to the next index (for textbox1 to textbox2 to textbox3....)
and if you press Ctrl+V you paste ofcourse.
Can I bind these 2 keys so that when the user presses Tab, it actually moves to the next index and pastes the clipboard to the testbox ?
if yes, how ?
Thanks
Im using Visual Studio 2008 Professional Edition
.Net Framework 3.5
-
Jun 9th, 2008, 09:05 AM
#2
Re: [2008] Binding Keys
you could try it this way
vb Code:
Private Sub TextBox1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyUp
If e.KeyCode = Keys.Tab Then
TextBox2.Text = Clipboard.GetText
End If
End Sub
Private Sub TextBox2_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox2.KeyUp
If e.KeyCode = Keys.Tab Then
TextBox3.Text = Clipboard.GetText
End If
End Sub
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Jun 9th, 2008, 10:19 AM
#3
Thread Starter
Addicted Member
Re: [2008] Binding Keys
oh no no no, I didnt explain well it seems, I want to do this globally, not in my application, wherever my application is running and the user presses TAB, it should also pastes, I think I should track down the TAB key and send the paste command for the focued window, but I'm not sure how to do it...
any help?
Im using Visual Studio 2008 Professional Edition
.Net Framework 3.5
-
Jun 9th, 2008, 10:27 AM
#4
Re: [2008] Binding Keys
i think you can use sendmessage API with WM_PASTE.
i've tried googling for your other thread. i found this - http://www.codeguru.com/forum/showth...hreadid=343977
its done in c++. you might be able to translate it
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Jun 9th, 2008, 10:39 AM
#5
Thread Starter
Addicted Member
Re: [2008] Binding Keys
I did already check that thread, thx anyway
I was thinking of following the method we're using in the Tracking Clipboard thread here, ie track TAB and then use SendMessage API, the problem as I said in that thread, is when Im registering Ctrl V or Tab as a hotkey, its losing its orginal function...
Im using Visual Studio 2008 Professional Edition
.Net Framework 3.5
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|