-
someone once told me that windows95 cannot rightalign text in a singleline textbox. so the simple solution was to make it a multiline box. i have done this but it so much of a pain in the butt to trap the enter key so chr(13) doesn't end up in the single line box. i have key preview set on the form and i trap the keycode and the active control to see if i need to do a sendkeys "{backspace}".. it works OK but when the text is SELECTED i think it deletes it.. anyone have a DIFFERENT solution to this? or maybe a way to fix windows95 to have right alignment?
Thai
-
Try using the following code
Code:
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
KeyAscii = 0
End If
End Sub
You must have the KeyPreview property of the Form set to True.
Hope it'll help