|
-
Sep 27th, 2000, 04:34 PM
#1
Thread Starter
Frenzied Member
here is my current code:
Code:
Private Sub txtLine1_KeyDown(KeyCode As Integer, Shift As Integer)
On Error Resume Next
Select Case KeyCode
Case vbKeyLeft:
txtLine1.Text = Left(txtLine1.Text, Len(txtLine1.Text) - 1)
txtLine1.SelStart = Len(txtLine1.Text) & " "
txtLine1.SetFocus
SendKeys "{END}"
Case vbKeyControl:
KeyCode = 0
Case vbKeyRight:
KeyCode = 0
Case vbKeyUp:
KeyCode = 0
Case vbKeyDown:
KeyCode = 0
Case vbKeyHome:
KeyCode = 0
Case vbKeyDelete:
KeyCode = 0
Case vbKeyEscape:
SendKeys "`", True
Case vbKeySnapshot:
frmDOS.PrintForm
End Select
End Sub
now when someone clicks the left arrow it deletes the stuff from the right (just like dos)
now how do I get it restore what was there when someone clicks the right arrow (just like in dos)?
thanks in advance
Dimava
NXSupport - Your one-stop source for computer help
-
Sep 27th, 2000, 04:48 PM
#2
Try this:
Code:
Case vbKeyRight:
SendKeys "^z", True
This will undo what was done.
-
Sep 27th, 2000, 04:53 PM
#3
Fanatic Member
If i remember correctly, to get DOS to remember what was typed for more than the current command, you had to load the DOSKEY program.
The way i think it worked, is it kept a list of what had been typed in. I suggest you keep what has been typed into the text box, and work on that, depending on the cursor position.
And by the way, if you press the left key in DOS, it does not delete anything. The backspace key does that job, as it should, but pressing the right key, restores what has been deleted.
Iain, thats with an i by the way!
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
|