Results 1 to 3 of 3

Thread: [02/03] Hiding a Forum and Messageboxes

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2005
    Posts
    181

    [02/03] Hiding a Forum and Messageboxes

    Hey. I have two forums in my program. The first form loads, then in the background loads the second form. The second form has some code that downloads files and opens them. The code includes messageboxes that will inform the user if something goes wrong. The thing is that right on startup, I want the second form to invisible while it executes the code. If there is an error, then it will say so in a label on form one. Then from here if the user clicks the label, then it will bring form 2 into visibility and then show the message boxes associated with it. So basically is there any way that I can hide a form along with any message boxes that it might show?

    Thanks
    John

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

    Re: [02/03] Hiding a Forum and Messageboxes

    No. You'd have to simply set a variable that indicates that an error message needs to be displayed. Then you'd test that variable in the Activated event handler and show the message if it was set, then reset it.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    Hyperactive Member ZaNi's Avatar
    Join Date
    Jun 2006
    Location
    Australia
    Posts
    360

    Re: [02/03] Hiding a Forum and Messageboxes

    Unless you wrote the code for the second form yourself and added a boolean to display the messageboxes or not based on whether you wanted it to... inefficient but doable
    * Don't limit yourself to sanity
    * I'd rather be optimistic and naive than pessimistic and right
    * Ask good questions, get good answers.

    My Codebank submissions:
    How to write one rountine to handle many events
    Accessing and Using variables across multiple forms
    Printing/Previewing a form or control

    Links I've "borrowed" from other people:
    vbdotnetboy - Awesome site for tips

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