Thinker

Would you like to react to this message? Create an account in a few clicks or log in to continue.
Thinker

Forum for story


2 posters

    【Description】- 编辑时,"Enter"作为换行而不是"Tab"

    markeloff
    markeloff
    无尽星空


    帖子数 : 326
    积分 : 5426
    威望 : 0
    注册日期 : 2011-09-06
    年龄 : 35
    地点 : Singapore

    【Description】- 编辑时,"Enter"作为换行而不是"Tab" Empty 【Description】- 编辑时,"Enter"作为换行而不是"Tab"

    Post by markeloff 2011-09-20, 4:07 pm

    Private Sub f01CurrencyEdit_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
    Try
    Select Case e.KeyCode
    Case Keys.Return //这里是回车
    If vEnterEnabled <> True Then System.Windows.Forms.SendKeys.Send("{TAB}")
    Case Keys.Escape
    If btnCancel.Visible = True Then
    Call btnCancel_Click(sender, e)
    ElseIf btnExit.Enabled = True Then
    Call btnExit_Click(sender, e)
    End If
    Case Keys.F10
    e.Handled = True
    Call btnSave_Click(sender, e)
    End Select
    Catch ex As Exception
    MsgBox("<f01CurrencyEdit.f01CurrencyEdit_KeyDown> " & ex.Message)
    End Try
    End Sub

    ------------------------

    Private Sub txtDescription_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtDescription.GotFocus
    vEnterEnabled = True
    txtDescription.SelectionStart = 0

    End Sub
    ----------------------------------------
    Private Sub txtDescription_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtDescription.LostFocus
    vEnterEnabled = False
    End Sub
    markeloff
    markeloff
    无尽星空


    帖子数 : 326
    积分 : 5426
    威望 : 0
    注册日期 : 2011-09-06
    年龄 : 35
    地点 : Singapore

    【Description】- 编辑时,"Enter"作为换行而不是"Tab" Empty Re: 【Description】- 编辑时,"Enter"作为换行而不是"Tab"

    Post by markeloff 2011-09-20, 4:08 pm

    Dim vEnterEnabled As Boolean

    vEnterEnabled
    Aueeins
    Aueeins
    呢喃的歌声


    帖子数 : 205
    积分 : 5229
    威望 : 0
    注册日期 : 2011-09-08
    地点 : SG

    【Description】- 编辑时,"Enter"作为换行而不是"Tab" Empty Re: 【Description】- 编辑时,"Enter"作为换行而不是"Tab"

    Post by Aueeins 2011-09-20, 9:35 pm

    Private Sub txtDescription_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtDescription.GotFocus
    vEnterEnabled = True
    txtDescription.SelectionStart = 0

    End Sub

      Current date/time is 2024-11-25, 4:18 pm