By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,064 Members | 1,524 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,064 IT Pros & Developers. It's quick & easy.

TextBox Problem

P: 54
I'm using Vb.net 2008 with an MDI form with a child named frmQueryDatabase 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.

Expand|Select|Wrap|Line Numbers
  1. 'When the frmQueryDatabase was a child to the MDI form
  2. Dim frm As New frmQueryDatabase
  3.         frm.MdiParent = Me
  4.         frm.Show()
  5.         frm.Activate()

But when the frmQueryDatabase 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!

'frmQueryDatabase.show

Always
Feb 9 '13 #1
Share this Question
Share on Google+
2 Replies


Mikkeee
P: 94
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.
Feb 9 '13 #2

P: 54
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.
Feb 10 '13 #3

Post your reply

Sign in to post your reply or Sign up for a free account.