Results 1 to 2 of 2

Thread: windows95 right alignment problem

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2000
    Posts
    168
    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

  2. #2
    Lively Member
    Join Date
    Apr 2000
    Location
    Rafaela (Argentine)
    Posts
    107
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width