dcsimg
Results 1 to 6 of 6

Thread: How to: Mimic VB's Form Designer.

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2004
    Posts
    36

    How to: Mimic VB's Form Designer.

    Hi all, I think the title pretty much says it all :-). Has anyone tried to do this and/or happens to know how and could point me to a URL or a source file somewhere that does this? Basically, I would like it to:

    1. Show a Form inside another form (like VB does when designing forms)
    2. Show the Size handles so I can move/resize controls on the form and the form itself (again like VB Does).

    that's all I'd like. I'd add in whatever else I need. :-).

    Hoping someone knows what I'm talking about and can help.

    Thank you.

    P.S. I've tried using the SetParent API which at least does constrain the child form inside the parent form sorta like VB does but as soon as i try to give focus to that form inside the other, it appears as a new form and that new form isn't constrained to any other.

    Regards
    When they say it can't be done, THAT's when they call me ;-)

    MystikShadows
    JC-Hosting.net

  2. #2
    Addicted Member makster246's Avatar
    Join Date
    Dec 2004
    Location
    nottingham
    Posts
    187

    Re: How to: Mimic VB's Form Designer.

    to your first question (how to get one form inside another - vb style) is to greater the outter form as a MDI form, and then for the inner form - selects its MDICHild property = TRUE.

    to solve your second problem, these next three lines should help

    Private Sub Form_Resize()
    label1.caption = me.width & " : " & me.height
    end sub



    Hope that was what you was after...

    Rob

  3. #3
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: How to: Mimic VB's Form Designer.

    I have never tried this code but see if the following file is any help.

    ftp://ftp.softcircuits.com/vbsrc/formdsgn.zip

  4. #4

    Thread Starter
    Member
    Join Date
    Nov 2004
    Posts
    36

    Re: How to: Mimic VB's Form Designer.

    Quote Originally Posted by makster246
    to your first question (how to get one form inside another - vb style) is to greater the outter form as a MDI form, and then for the inner form - selects its MDICHild property = TRUE.

    to solve your second problem, these next three lines should help

    Private Sub Form_Resize()
    label1.caption = me.width & " : " & me.height
    end sub



    Hope that was what you was after...

    Rob
    HI thanks for the quick reply....It's not quite what i was trying to do...I know about MDI Forms and Child forms...:-). In vb, when you select Add then Form (or double click any form you already have in your project, that form appears inside a while backgrounded form that's what I'm trying to reproduce :-) I'm close with the SetParent API cept for the got focus part. when I try to give that form the focus (ChildForm.SetFocus) instead of just giving it the focus, it just creates a new instance of that child form. Once I figure that out, I'll be well on my Way :-).
    When they say it can't be done, THAT's when they call me ;-)

    MystikShadows
    JC-Hosting.net

  5. #5

    Thread Starter
    Member
    Join Date
    Nov 2004
    Posts
    36

    Re: How to: Mimic VB's Form Designer.

    Quote Originally Posted by brucevde
    I have never tried this code but see if the following file is any help.

    ftp://ftp.softcircuits.com/vbsrc/formdsgn.zip
    WEll that project almost answers all other question I might have had after I solve the first problem ;-)...

    Thank you very much, this will come very handy very soon.

    Now to see if I can fix my first problem. Like I mentioned above I can have the form show in another form with the SetParent API (like vb does when you select to create a new form or open an existing one...it shows your form inside a white backgrounded other form. I want to mimic that.. I think i'm close, but I'm not there yet :-).. After that comes the part that's almost complete in that example you sent me. That will be a big time saver...Thank you.
    When they say it can't be done, THAT's when they call me ;-)

    MystikShadows
    JC-Hosting.net

  6. #6
    Lively Member vbgamer45's Avatar
    Join Date
    Sep 2004
    Posts
    67

    Re: How to: Mimic VB's Form Designer.

    Excellent sample brucevde. That is pretty cool, was thinking about making a vb form/control designer for a project of mine. Thanx
    Semi VB Decompiler 0.07 Getting better everyday
    http://www.visualbasiczone.com/produ...ivbdecompiler/
    VisualBasicZone
    http://www.visualbasiczone.com
    EasyPHPBB.com
    Free PHPBB forums the quick and easy way!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width