Click here to Skip to main content
15,891,657 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Here Is My Code For Textbox_KeyDown
VB
Private Sub TxtOrderNo_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TxtOrderNo.KeyDown
        If e.KeyCode = Keys.F4 And Me.Tag = "View" Then
            frmhelp = New FrmHelp
            frmhelp.Sql = "SELECT SalesOrderMast.OrderNo AS [ORDER NO], SalesOrderMast.OrderDate AS [ORDER DATE], PARTYMASTER.Description AS [PARTY NAME] FROM SalesOrderMast" & vbCrLf _
            & " LEFT JOIN SUBLEDGERMASTER AS PARTYMASTER ON SalesOrderMast.PartyCode = PARTYMASTER.SubLedgerCode ORDER BY SalesOrderMast.OrderNo"
            frmhelp.TxtObject = TxtOrderNo
            frmhelp.ReturnField = 0
            frmhelp.OnLineCreationYN = False
            frmhelp.Gridsize1 = {100, 100, 300}
            frmhelp.HelpTitle = UCase("Order No")
            frmhelp.Top = 300
            frmhelp.Left = 350
            frmhelp.ShowDialog()
            frmhelp = Nothing
            Call TxtOrderNo_Validating(Nothing, Nothing)
        ElseIf e.KeyCode = 13 Then
            Call TxtOrderNo_Validating(Nothing, Nothing)
        End If
    End Sub


Return Value From frmhelp Form
When Working With Same Mdi Application its Work Perfect But
When Sql Server Management Studio Query Window Execute Query
Then Focus Move To the Sql Server Management Studio Query Window
Same Thing happens with any Other Application Like Excel, Word

Please Help Me
Thanks In Advance

Please Find Attachment

https://drive.google.com/file/d/0B3fvL_S8Z_DbRm9XVEFwbnJqWVU/view[DownLoad Code]
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900