CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 11 of 11
  1. #1
    Join Date
    Mar 2000
    Location
    Birmingham, England
    Posts
    2,520

    How do i load a form?

    Hi,

    This is such a beginner question, i'm afraid you may laugh at me! You see, i'm a VC++ programmer but i need to write a small VB test program.

    How can i load a form ? I have an activex dll which declares a function called 'Load'. In this dll project i also have a splash screen form called frmSplash. I want to display this form when i call the Load function. What line of code do i need in my 'Load' function which will display frmSplash ?

    Thanks






    Jase

    http://www.slideshowdesktop.com
    View your images and photos on your desktop with ease using SlideShow Desktop, the desktop wallpaper manager for Microsoft Windows.

    Jase

    www.slideshowdesktop.com
    View your images and photos on your desktop with ease using SlideShow Desktop, the desktop wallpaper manager for Microsoft Windows.
    ...

  2. #2
    Join Date
    Sep 2001
    Location
    Montreal Canada
    Posts
    1,080

    Re: How do i load a form?

    form.show 1

    Nicolas Bohemier

  3. #3
    Join Date
    May 2001
    Location
    Canada
    Posts
    182

    Re: How do i load a form?

    If I got the right idea of your question, you can try this:

    frmSplash.Show

    Regards,

    Michi

  4. #4
    Join Date
    Jun 2001
    Location
    MO, USA
    Posts
    2,868

    Re: How do i load a form?


    frmSplash.Show vbModal



    or

    frmSplash.show vbModeless





  5. #5
    Join Date
    Mar 2000
    Location
    Birmingham, England
    Posts
    2,520

    Re: How do i load a form?

    Excellent. Thanks !


    Jase

    http://www.slideshowdesktop.com
    View your images and photos on your desktop with ease using SlideShow Desktop, the desktop wallpaper manager for Microsoft Windows.

    Jase

    www.slideshowdesktop.com
    View your images and photos on your desktop with ease using SlideShow Desktop, the desktop wallpaper manager for Microsoft Windows.
    ...

  6. #6
    Join Date
    Mar 2000
    Location
    Birmingham, England
    Posts
    2,520

    Re: How do i load a form?

    Thankyou


    Jase

    http://www.slideshowdesktop.com
    View your images and photos on your desktop with ease using SlideShow Desktop, the desktop wallpaper manager for Microsoft Windows.

    Jase

    www.slideshowdesktop.com
    View your images and photos on your desktop with ease using SlideShow Desktop, the desktop wallpaper manager for Microsoft Windows.
    ...

  7. #7
    Join Date
    Mar 2000
    Location
    Birmingham, England
    Posts
    2,520

    Re: How do i load a form?

    Thanks. What does the '1' mean ? Is it simply the number that represents vbModal or vbModeless ?


    Jase

    http://www.slideshowdesktop.com
    View your images and photos on your desktop with ease using SlideShow Desktop, the desktop wallpaper manager for Microsoft Windows.

    Jase

    www.slideshowdesktop.com
    View your images and photos on your desktop with ease using SlideShow Desktop, the desktop wallpaper manager for Microsoft Windows.
    ...

  8. #8
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: How do i load a form?

    Use of "Load" as a function probably is not good. "Load" is a reserved word in VB. You might run into naming conflicts.
    To get your splash screen to display

    frmSplash.show



    should display it.

    John G

  9. #9
    Join Date
    Aug 2000
    Location
    Namibia
    Posts
    139

    Re: How do i load a form?

    Although all the other replies are correct, I prefer doing it something similar to what you would in C++.
    Since the Form is a class I declare a variable of that type then instantiate the object, call the load and show methods and walla.
    dim fSplash as frmSplash
    set fsplash = new frmSplash
    load fsplash
    fplash.show
    '// Do whatever processing we need to initialise the app
    unload fSplash
    set fsplash = nothing



    That's neat and tidy.


  10. #10
    Join Date
    Mar 2000
    Location
    Birmingham, England
    Posts
    2,520

    Re: How do i load a form?

    Thanks


    Jase

    http://www.slideshowdesktop.com
    View your images and photos on your desktop with ease using SlideShow Desktop, the desktop wallpaper manager for Microsoft Windows.

    Jase

    www.slideshowdesktop.com
    View your images and photos on your desktop with ease using SlideShow Desktop, the desktop wallpaper manager for Microsoft Windows.
    ...

  11. #11
    Join Date
    Sep 2001
    Location
    Montreal Canada
    Posts
    1,080

    Re: How do i load a form?

    yes

    Nicolas Bohemier

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