Thinker

Personal e-notepad


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

    markeloff
    markeloff
    无尽星空

    帖子数 : 244
    积分 : 3636
    威望 : 0
    注册日期 : 2011-09-06
    年龄 : 31
    地点 : Singapore

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

    Post by markeloff on 20/09/11, 09:07 am

    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
    无尽星空

    帖子数 : 244
    积分 : 3636
    威望 : 0
    注册日期 : 2011-09-06
    年龄 : 31
    地点 : Singapore

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

    Post by markeloff on 20/09/11, 09:08 am

    Dim vEnterEnabled As Boolean

    vEnterEnabled
    Aueeins
    Aueeins
    水面上的小草

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

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

    Post by Aueeins on 20/09/11, 02: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

    Sponsored content

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

    Post by Sponsored content


      Current date/time is 30/05/20, 11:10 pm