none
Windows Form User control Textbox field no accepting input. RRS feed

  • Question

  • I currently have an MFC dialog that is hosting a User control that I have created in VB.net. Everything works as expected (ie. ComboBoxes, ListView, etc..). When I select a Textbox that is hosted in this control no input gets accepted. I am unsure why this would occur. Any help would be appreciated.
    Friday, July 17, 2015 6:00 PM

Answers

  • Hi,

    The issue was found. In our MFC application there was a block of code that would consume WM_CHAR message.

    • Marked as answer by Impulse21 Monday, July 20, 2015 1:18 PM
    Monday, July 20, 2015 1:18 PM

All replies

  • Hi,

    Could you share the code of User control? then we could reproduce the issue and help you better.

    Omar

    Monday, July 20, 2015 8:29 AM
  • Hi Omar,

    It's a very basic user control

    Public Class UserControl1
        Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
            MsgBox("HelloWorld")
            RaiseEvent btnClicked(e)
        End Sub

        Private Sub textLeave(sender As Object, e As EventArgs) Handles TextBox1.Leave

        End Sub

        Public Event btnClicked(e As EventArgs)
    End Class

    The control hosts one button and two TextBoxes

    Monday, July 20, 2015 10:40 AM
  • Hi,

    The issue was found. In our MFC application there was a block of code that would consume WM_CHAR message.

    • Marked as answer by Impulse21 Monday, July 20, 2015 1:18 PM
    Monday, July 20, 2015 1:18 PM