|
-
Jul 30th, 2004, 08:12 AM
#1
Thread Starter
New Member
Printing text where the cursor is
I just want to be able to print text where ever the cursor is located in my application.
It doesn't matter whether it's in textbox1 textbox2 or textbox3, i just want it to print in whichever one has focus.
How do i go about doing this?
-
Jul 30th, 2004, 08:23 AM
#2
Thread Starter
New Member
Forget it, solved the problem myself 
For future reference if anyone needs to know, it's "sendkeys.send()"
-
Jul 31st, 2004, 06:09 AM
#3
I tried doing this and ended up with this:
VB Code:
Dim cmdTemp As Control
For Each cmdTemp In Me.Controls
If TypeOf cmdTemp Is TextBox And cmdTemp Is Me.ActiveControl Then
CType(cmdTemp, TextBox).SelectedText = "abc"
Exit For
End If
Next
Problem is, I placed it in a command button's click event, so the command button ends up getting focus. Woe is me.
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
|