CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2002
    Location
    England
    Posts
    163

    Unhappy Creating a Form at Runtime

    Is it possible to create a form at runtime in VB? I mean create on in code, from scratch, not base it on an existing form in the project. Can I tie events to it too?
    Finite

    "If a cat always lands on its feet, and a peice of bread always lands butter side down, if you strap a peice of bread butter side up to the back of a cat, will it hover?"

  2. #2
    Join Date
    Jan 2000
    Location
    Olen, Belgium
    Posts
    2,477
    You *could*, however, I can imagine it would be a **** of a job. I've seen a post on PlanetSourceCode showing you how to cretae a form completely by code. As for adding events, since you have a hWnd of the form, you could subclass the form and process the window messages.
    Tom Cannaerts
    email: cakkie@cakkie.be.remove.this.bit
    www.tom.be (dutch site)

  3. #3
    Join Date
    Jul 2002
    Location
    England
    Posts
    163
    Yeah. I thought as much. I think i'll bail on this method and use a simpler one!
    Finite

    "If a cat always lands on its feet, and a peice of bread always lands butter side down, if you strap a peice of bread butter side up to the back of a cat, will it hover?"

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

Featured