TextBox Problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Benniit
    New Member
    • May 2008
    • 54

    TextBox Problem

    I'm using Vb.net 2008 with an MDI form with a child named frmQueryDatabas e having a textbox (txtQuery).

    I have noticed that when I added the child to the MDI form and run the program, the content of the text box in debug mode was always empty, though you could see a text in it.

    Code:
    'When the frmQueryDatabase was a child to the MDI form
    Dim frm As New frmQueryDatabase
            frm.MdiParent = Me
            frm.Show()
            frm.Activate()

    But when the frmQueryDatabas e was no more a child to the MDI the content of the txtQuery was always picked in debug mode. I just don't understand it! Please help!

    'frmQueryDataba se.show

    Always
    Last edited by Rabbit; Feb 10 '13, 12:27 AM. Reason: Please use code tags when posting code.
  • Mikkeee
    New Member
    • Feb 2013
    • 94

    #2
    Benniit, when you say 'you don't see the text in debug mode', where are you and how are you attempting to see it? Are you printing to the console? Have you tried showing the value in a messagebox? Are you in the correct instance of your form? Need more info.

    Comment

    • Benniit
      New Member
      • May 2008
      • 54

      #3
      Hi Mikkeee, since I wasn't getting the required result, I decided to step into the code and that was when I realized there was something wrong even if I displayed it using a msgbox. What surprises me is that when I detached it from the mdi form and run it, it worked fine. Just that it failed to work with the mdi form.

      Comment

      Working...