Results 1 to 12 of 12

Thread: How to create a Form at run-time

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2012
    Posts
    433

    How to create a Form at run-time

    For some reason, I need to create a form at run-time.
    How to do this?

  2. #2
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,996

    Re: How to create a Form at run-time

    We are very curious people. I would like to know "for some reason".

  3. #3
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,145

    Re: How to create a Form at run-time

    Wish jdy was as 'curious'!


    Just a quick Google search turns up plenty of hits....like this:


    https://www.dreamincode.net/forums/t...time-with-vb6/

  4. #4
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,996

    Re: How to create a Form at run-time

    Quote Originally Posted by SamOscarBrown View Post
    Wish jdy was as 'curious'!


    Just a quick Google search turns up plenty of hits....like this:


    https://www.dreamincode.net/forums/t...time-with-vb6/
    do you mean to use .NET?

  5. #5
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,145

    Re: How to create a Form at run-time

    not me.....maybe jdy.
    looks like VB6 code to me...didn't test

  6. #6
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,996

    Re: How to create a Form at run-time

    "to create a Form at run-time" in VB6 can mean different things.

    It can mean to instantiate an existing (already designed) form.
    Or it could mean to create a window from scratch via API.
    Or perhaps for someone it could mean some other thing.

    We have no idea what the OP wants.

  7. #7
    PowerPoster SamOscarBrown's Avatar
    Join Date
    Aug 2012
    Location
    NC, USA
    Posts
    9,145

    Re: How to create a Form at run-time

    DID test that other program...and, yes, does that fine.

    BUT, I guess your's is a BIT simpler

  8. #8
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: How to create a Form at run-time

    Quote Originally Posted by SamOscarBrown View Post
    not me.....maybe jdy.
    looks like VB6 code to me...didn't test
    I guess someone did not scroll down on the page. The first piece of code is indeed .Net C# specifically but the piece lower on the page is VB6

  9. #9
    PowerPoster
    Join Date
    Feb 2017
    Posts
    4,996

    Re: How to create a Form at run-time

    Quote Originally Posted by DataMiser View Post
    the piece lower on the page is VB6
    Yes, but it is not code to create new forms out of nothing.
    That can't be done in VB6 (*).

    PS: (*) Of course, i mean normally. Everything could be possible by changing the way VB6 works by means of ASM or strange tricks.

  10. #10

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2012
    Posts
    433

    Re: How to create a Form at run-time

    Curiosity is always good!
    Roughly speaking, use in calculating form's width.
    I can make this dummy form at design time but want to make a form at design time temporarily.

  11. #11

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2012
    Posts
    433

    Re: How to create a Form at run-time

    Curiosity is always good!
    Roughly speaking, use in calculating form's width.
    I can make this dummy form at design time but want to make a form at design time temporarily.

  12. #12

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