Results 1 to 8 of 8

Thread: MDI Forms

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2000
    Location
    Oshkosh, WI
    Posts
    163

    Angry

    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

  2. #2
    Guest
    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.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2000
    Location
    Oshkosh, WI
    Posts
    163
    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

  4. #4
    Guest
    I placed a Tabbed Dialog Control on my Form and it worked perfectly with the rest of the code.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jan 2000
    Location
    Oshkosh, WI
    Posts
    163
    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

  6. #6
    Guest
    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.

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Jan 2000
    Location
    Oshkosh, WI
    Posts
    163
    That would be great - any takers ??
    Glenn D
    Development/Analyst

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Jan 2000
    Location
    Oshkosh, WI
    Posts
    163

    Cool

    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
  •  



Click Here to Expand Forum to Full Width