Results 1 to 5 of 5

Thread: Help me display MDI child form

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2003
    Location
    Chicago, Illinois
    Posts
    9

    Help me display MDI child form

    Howdy,
    I'm trying to display a child form with six text boxes. I'm trying to load
    an array of strings broken into six fields with one field going into each
    text box.
    If you know how to do this please help me.
    I'll insert my code from the commonCode and the MdiChild form.
    If you can help me, I'll be forever grateful.

    Lewis
    Attached Files Attached Files
    I am the Code King

  2. #2
    Fanatic Member
    Join Date
    Sep 2002
    Posts
    518
    Read:
    ms-help://MS.VSCC/MS.MSDNVS/vbcon/html/vbtskCreatingMDIChildForms.htm

    Sample project attached.
    Attached Files Attached Files

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2003
    Location
    Chicago, Illinois
    Posts
    9
    Thanx mucho, Slow Learner.

    I can handle the declared array type of program that you sent me an example of. Check the code I posted in my first post. I am reading from an array of strings. It's a bit dif than a simple declared array.

    I am mainly having trouble with the OpenFileDialog. When I click to Open a file in my menu, OFD box comes up and I click on a text file to open, the OFD opens another instance of OFD that goes up one level to the folder that the text file is in. It then displays all the files in the folder. I am using a filter to select .txt files. The filter only works in the first OFD. After I select the text file again and click Open I finally get the Child Form.

    I think the main prob is I am having to declare an OFD instance in the Module and I an clicking and dragging an OFD from the Toolbox on the mdiChild from. This one is really racking my head.

    I get the Child to display but only after clicking through the two OFD boxes.

    Help, please!
    I am the Code King

  4. #4
    Fanatic Member
    Join Date
    Sep 2002
    Posts
    518
    Sorry I didn't get an idea of what you wanted from the first post.

    Okay, so your problem really is that you are getting two OpenFileDialogs when you expect one? This block of code seems suspicious:

    Public Sub ofdmain_FileOk(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles ofdmain.FileOk


    Why do you have an event handler for OpenFileDialog.FileOK? Seems like you should put the code you have in the event handler in this block:

    If ofdmain.ShowDialog = DialogResult.OK Then...

    Also, in said event code, you have:
    .loadit()

    which appears to be why you're getting two openfiledialogs. Hope this helps.

  5. #5

    Thread Starter
    New Member
    Join Date
    Mar 2003
    Location
    Chicago, Illinois
    Posts
    9
    I got it. It works now.

    Check the attchment for the full code to the project....so far!

    Thanx to you folks.

    This is the meat of the program, I'll post more when I complete the project.
    Attached Files Attached Files
    I am the Code King

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