Load Order issues
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8

Thread: Load Order issues

  1. #1
    Join Date
    Nov 2012
    Posts
    4

    Load Order issues

    Hi there everyone, I'm new to the forums and new to coding. I'm currently making a program for a VB class I'm in. I'm required to have a splashscreen and 5 windows. Not a big deal, its a simple little rpg calculator, my issue is I set my code up to load a form up to start a new game or load an old game up. I have visual basic loading up the splashscreen at the same time. I wish to be nudged in the right direction. How would I allow the splash screen to show up, close, then load the dialogbox that allows the player to start a new game or load an old character file?

    My current code is in a form load

    " Private Sub Mainform_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    SimWelcome.ShowDialog()
    End Sub
    End Class"

  2. #2
    Join Date
    Jan 2006
    Location
    Chicago, IL
    Posts
    14,877

    Re: Load Order issues

    That doesn't look like a Spashscreen. Lesson Here
    Last edited by dglienna; November 25th, 2012 at 09:37 PM.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Aug 2009
    Location
    NW USA
    Posts
    173

    Re: Load Order issues

    The ShowDialog will stop all activity in Mainform until SimWelcome is closed. One way would be to add code to SimWelcome_Load where, after some time, it closes itself. Have you seen the Timer class yet?

  4. #4
    Join Date
    Nov 2012
    Posts
    4

    Re: Load Order issues

    Well good news, that's not my splash screen. It's a dialog box used to load old files or start a new one. The issue I have is the code I put in loads up that window at the same exact time the splash screen loads up, the splash doesn't go away until the dialog window goes away. I have had a lesson on timers, do I need to hard code the splash screen in, set a timer up to release it, and then display the dialogbox?

  5. #5
    Join Date
    Nov 2012
    Posts
    4

    Re: Load Order issues

    Second, thanks for the site link David, I'm gonna troll it and see if I can learn anything. =)

  6. #6
    Join Date
    Aug 2009
    Location
    NW USA
    Posts
    173

    Re: Load Order issues

    Open your splash first with ShowDialog so it stops everything else until it closes. If you are working in VS you can set a splash screen in My Project - Application (on the botom), but I don't know if that's the assignment

  7. #7
    Join Date
    Jun 2005
    Location
    JHB South Africa
    Posts
    3,771

    Re: Load Order issues

    Quote Originally Posted by Mur16 View Post
    Open your splash first with ShowDialog so it stops everything else until it closes. If you are working in VS you can set a splash screen in My Project - Application (on the botom), but I don't know if that's the assignment
    The Idea of a Splash screen is that everything else can continue loading (but the user at least see's a startup screen).. Expecially for those apps that have code that takes longer than a few seconds to load..

    If you want a welcome page to show after the splash page, place the code in the Form Activate sub, not Form Load sub....
    Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
    WPF Articles : 3D Animation 1 , 2 , 3
    Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
    Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
    All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.

  8. #8
    Join Date
    Nov 2012
    Posts
    4

    Re: Load Order issues

    First off I would like to thank everyone that replied and tried to help me. Everyone's advice was helpful in some way or another. I also asked my teacher about how to do it in a fashion that would be feasable to him. I then felt like an idiot when he showed me I could make the simwelcome dialog box as my main load in the properties. Thank you everyone!

Posting Permissions

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


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center