|
-
Jun 26th, 2000, 03:28 AM
#1
Thread Starter
Addicted Member
Heres my problem, I have an MDI parent form that has a picture box placed on it. Inside the picture box I placed a textbox and 2 command buttons. The way the app works is that the user types an order into the textbox and then presses one of the command buttons. An MDI child form is then opened up with information on the order. This works fine when there is no other mdi child forms loaded.
However when an mdi child form is loaded, I can longer enter a new order number into the textbox on the parent. I can get focus to the textbox (verified this with debug) but the keypress events for the textbox don't fire.
I've never tried to use an MDI parent form in this way, do I might be missing something obvious. If anyone can shed some light on this I would appreciate it.
Glenn D
Development/Analyst
-
Jun 26th, 2000, 03:40 AM
#2
I tried re-making what you have just said and everything works fine for me.
Here is what I did. On the Parent, there is a PictureBox with 1 TextBox and 1 CommandButton. On the Child, there is 1 TextBox.
Here is my code for the CommandButton on the Parent. When a New Form loads up, I can still go back to the parent and type in the TextBox.
Code:
Private Sub Command1_Click()
Dim frmNew As New Form1
frmNew.Text1 = Text1
frmNew.Show
End Sub
Let me know if I did anything wrong.
-
Jun 26th, 2000, 03:49 AM
#3
Thread Starter
Addicted Member
I simplified my app, and went with the simplest approach (just like Meagtron) and it worked. However when I placed a Microsoft tabbe dialog control on the child form is stopped working. Apparently has something to do with the tabbed dialog control.
I guess I will continue looking for a solution.
Glenn D
Development/Analyst
-
Jun 26th, 2000, 04:01 AM
#4
I placed a Tabbed Dialog Control on my Form and it worked perfectly with the rest of the code.
-
Jun 27th, 2000, 12:53 AM
#5
Thread Starter
Addicted Member
I wonder if it's a problem with VB 6.0
It will not work on my machine. I've tried other controls (tabstrip) and they work just fine. I was trying to avoid using the tabstrip because it's not a straight forward solution.
Ayn other suggestions would be appreciated.
Glenn D
Development/Analyst
-
Jun 27th, 2000, 02:09 AM
#6
Maybe someone else with VB6 should try the code and see if it works. Then we can see if it's just you or if it's VB6.
-
Jun 27th, 2000, 02:14 AM
#7
Thread Starter
Addicted Member
That would be great - any takers ??
Glenn D
Development/Analyst
-
Jun 28th, 2000, 10:43 PM
#8
Thread Starter
Addicted Member
I figured out the problem. The problem only occurs if the tabbed dialog control has the focus. If you set the focus to anything but the tabbed dialog control it works. I'll setup up the app so anytime the user clicks on a tab I'll set the focus to some control on the tab.
Glenn D
Development/Analyst
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|