Results 1 to 22 of 22

Thread: Does this happen to everybody or just me?

  1. #1

    Thread Starter
    Hyperactive Member jonwondering's Avatar
    Join Date
    May 2005
    Posts
    311

    Does this happen to everybody or just me?

    Hey everybody, when I start any application no matter how big or small, the start up form usually loads weird. I have a sorta-kinda-fast enough computer, but when I click on .exe the controls and a few images load one after another - I mean it only takes a portion of a second to load, but still I could see how they appear on a form. Does this happen to everybody? or is there a way to make the form load in the background and then show everything - the form with controls on it (at once) to the user?

    P.S.: If what I said doesn't make sense, then I just probably have a slow computer

    Thanks,
    jonwondering

  2. #2
    Frenzied Member FishGuy's Avatar
    Join Date
    Mar 2005
    Location
    Bradford UK
    Posts
    1,708

    Re: Does this happen to everybody or just me?

    on load me.hide
    do stuff
    me.show

  3. #3

    Thread Starter
    Hyperactive Member jonwondering's Avatar
    Join Date
    May 2005
    Posts
    311

    Re: Does this happen to everybody or just me?

    OK I'll try that.

    P.S.: Whoops, didn't see that post:
    http://vbforums.com/showthread.php?t=345200

  4. #4

    Thread Starter
    Hyperactive Member jonwondering's Avatar
    Join Date
    May 2005
    Posts
    311

    Re: Does this happen to everybody or just me?

    What if I don't even have anything in Form1.Load() event?

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Does this happen to everybody or just me?

    The Load event is raised before the form becomes visible anyway, so there is no point hiding the form in the Load event handler. The Activated event is raised when the form becomes visible.

  6. #6

    Thread Starter
    Hyperactive Member jonwondering's Avatar
    Join Date
    May 2005
    Posts
    311

    Re: Does this happen to everybody or just me?

    So there's no way to speed up the form loading?

  7. #7
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Does this happen to everybody or just me?

    What is your procecssor speed and RAM size?

    How many controls do you have on your form?

    What does your form do?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  8. #8
    Hyperactive Member
    Join Date
    Mar 2005
    Location
    Maine, USA
    Posts
    277

    Re: Does this happen to everybody or just me?

    I have a 700 mhz PIII machine that I have VB Express on, I find it interesting to see what is drawn in what order in VB and out of it.
    Like when I minimize the IDE and max it again, the sidebar appears first then the top.
    <deis> I turn on god mode when I program
    <deis> I just call it .NET


    If my post was helpful, please Rate it

  9. #9

    Thread Starter
    Hyperactive Member jonwondering's Avatar
    Join Date
    May 2005
    Posts
    311

    Re: Does this happen to everybody or just me?

    Haha, thats funny Kal_Torak.

    RobDog888,
    I am running 1.4GHz Pentium M, 512MB RAM, XP Home
    The startup form is the wizard, so it has a little image on it and a tabcontrol.
    It does not do anything, but wait for the user to click Next.

    Thanks.

  10. #10
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Does this happen to everybody or just me?

    Since its the startup form the form isnt pre-initialized so to speak. If you create a Module with a sub Main and set that as the startup
    and declare a public var for your form as New form1. When you do the application.run(oForm) it may help.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  11. #11

    Thread Starter
    Hyperactive Member jonwondering's Avatar
    Join Date
    May 2005
    Posts
    311

    Re: Does this happen to everybody or just me?

    OK, I'll try that. Thanks

  12. #12
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: Does this happen to everybody or just me?

    Most people usually use this way instead of using a global form from sub Main...

    Application.Run(new Form1)
    I don't live here any more.

  13. #13

    Thread Starter
    Hyperactive Member jonwondering's Avatar
    Join Date
    May 2005
    Posts
    311

    Re: Does this happen to everybody or just me?

    By saying "startup" form I actually didnt make myself perfectly clear. That wizard form is not the main form. It is actually started from another form that is always invisible. By saying "startup", I meant that it is the first form the user sees when he/she runs the program (for the first time). But I don't know about Application.Run() because I use DialogResult to determine if the wizard was successful or got canceled...

  14. #14
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489

    Re: Does this happen to everybody or just me?

    where are those images being loaded FROM. are they grabbed off your hard-drive, off the internet somewhere, off a network share? that could have a LOT to do with the speed of the images' load time.

  15. #15

    Thread Starter
    Hyperactive Member jonwondering's Avatar
    Join Date
    May 2005
    Posts
    311

    Re: Does this happen to everybody or just me?

    I wish that was the problem, but those images are all embedded into the exe.

  16. #16

    Thread Starter
    Hyperactive Member jonwondering's Avatar
    Join Date
    May 2005
    Posts
    311

    Re: Does this happen to everybody or just me?

    Like I said before, it's not that much of a deal - the "load" time only takes a portion of a second, but looking at other exe's with wizards and forms much more complex than mine, their forms/controls are shown instantly...

  17. #17
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Does this happen to everybody or just me?

    Is the image(s) being loaded into the control from a directory file or a resource file?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  18. #18

    Thread Starter
    Hyperactive Member jonwondering's Avatar
    Join Date
    May 2005
    Posts
    311

    Re: Does this happen to everybody or just me?

    It's a picture box, so I assumed they are embedded.

  19. #19
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Does this happen to everybody or just me?

    Ok, but how are you loading the image? In the property window and browsed and selected an image? Or through code
    using the .Image property and .FromFile("C:\Somepath\somepicture.jpg") ?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  20. #20

    Thread Starter
    Hyperactive Member jonwondering's Avatar
    Join Date
    May 2005
    Posts
    311

    Re: Does this happen to everybody or just me?

    Property window, browsed and selected an image.

  21. #21
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Does this happen to everybody or just me?

    Then its embedded. If it was being loaed from a file then that may be part of the issue, but guess not. Is it a large image/picturebox?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  22. #22

    Thread Starter
    Hyperactive Member jonwondering's Avatar
    Join Date
    May 2005
    Posts
    311

    Re: Does this happen to everybody or just me?

    Its 173 * 211 pixels, so it's not huge and the form is not that big, but still for some reason the form acts kinda weird. Maybe it's just my slow computer...

    Thanks for your help anyway

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