CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 27 of 27
  1. #16
    Join Date
    Jun 2008
    Posts
    2,477

    Re: Form Load Event never fired

    We can isolate out the DB stuff.

  2. #17
    Join Date
    Jul 2009
    Posts
    12

    Re: Form Load Event never fired

    You're amazing.

    Thanks again. Also, please excuse the probably dirty code. I'm just starting this so I'm sure there are plenty of things I'm doing wrong...

    I'm a BizTalk developer...


    Thanks,
    Jerad


    P.S- Actually I can't seem to upload it. My project is 1 MB zipped and the max I can post is 500kb... Can I e-mail it to you??

  3. #18
    Join Date
    Jun 2008
    Posts
    2,477

    Re: Form Load Event never fired

    You can upload to a place like megaupload for free and then just provide the link.

  4. #19
    Join Date
    Jul 2009
    Posts
    12

    Re: Form Load Event never fired

    Alright, awesome.

    Here's the link.

    http://www.megaupload.com/?d=WWUUKZW0

    Thanks,
    Jerad

  5. #20
    Join Date
    Jun 2008
    Posts
    2,477

    Re: Form Load Event never fired

    I looked at your project and noticed that the only creation of the "Clients" class has been commented out. This is the only class that creates a "LifeInsurance" instance, so I just added a button to the startup form ("Switchboard") which creates a LifeInsurance form. The load event fired as expected and he "Loading..." messagebox appeared, so I am not sure what your problem really is.


  6. #21
    Join Date
    Jul 2009
    Posts
    12

    Re: Form Load Event never fired

    Alrighty, so what you're saying is you didn't see anything wrong?

    That's strange. So what I just did (since it worked on yours...) is I opened the Switchboard form. Then added a button and on the button I added:

    LifeInsurance LI = new LifeInsurance("RecordKey");
    LI.Show();


    When I ran this and clicked the button, the LifeInsurance form was instantiated but the "Loading..." message box never appeared. Can you send me back what you changed and let me see if it works on my machine. If yours doesn't (and you know it works on yours..) then could it be specific to my computer settings or something? I know that sounds crazy..

    Thanks,
    Jerad

  7. #22
    Join Date
    Jun 2008
    Posts
    2,477

    Re: Form Load Event never fired

    Code:
    public partial class Switchboard : Form
        {
            public Switchboard()
            {
                InitializeComponent();
                button1.Click += button1_Click;
            }
    
            private void button1_Click(object sender, EventArgs e)
            {
                LifeInsurance frm = new LifeInsurance( "foo" );         
                frm.Show( );            
            }
    }

  8. #23
    Join Date
    Jul 2009
    Posts
    12

    Re: Form Load Event never fired

    Yep, I do that exact same thing and it's never fired..

    Is this a lost cause?

    Thanks,
    Jerad

  9. #24
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Form Load Event never fired

    I just tried this by adding a temporary button to the SwitchBoard form as BigEd did and got a binding error with "RatingClassandQuote". This caused the LifeInsurance form not to appear. I commented out this binding in the LifeInsurance.Designer.cs file and the event fired and form appeared.

    Quote Originally Posted by JMSWebDesign View Post
    Is this a lost cause?
    Are you doing this by adding a temporary button on the SwitchBoard form?
    Last edited by Arjay; July 6th, 2009 at 12:30 AM.

  10. #25
    Join Date
    Oct 2008
    Location
    Cologne, Germany
    Posts
    756

    Re: Form Load Event never fired

    on my machine the Load event also fires
    win7 x86, VS 2008 & 2010, C++/CLI, C#, .NET 3.5 & 4.0, VB.NET, VBA... WPF is comming

    remeber to give feedback you think my response deserves recognition? perhaps you may want to click the Rate this post link/button and add to my reputation

    private lessons are not an option so please don't ask for help in private, I won't replay

    if you use Opera and you'd like to have the tab-button functionality for the texteditor take a look at my Opera Tab-UserScirpt; and if you know how to stop firefox from jumping to the next control when you hit tab let me know

  11. #26
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Form Load Event never fired

    Quote Originally Posted by JMSWebDesign View Post
    P.S- Actually I can't seem to upload it. My project is 1 MB zipped and the max I can post is 500kb... Can I e-mail it to you??
    Usually you delete the \bin and \obj folders before zipping. You'll need to move the StaffDotNet.xxx.dll binary into the project folder. This will get the zipped file down to about 250K. In general, you'll want to remove these folders before zipping the project.

  12. #27
    Join Date
    Jul 2009
    Posts
    12

    Angry Re: Form Load Event never fired

    Thanks guys for all of your help. I think I will start the form from scratch and test along the way. I created a blank form and put the load event on it. When ran, the load event was fired. So then I took my old form and copied all of the controls and pasted them on to the newly created form (that worked). Once I pasted the controls on the new form and ran it, the load event was not fired........

    I'm going to use Snag-It later on tonight and post a link to the video of what I am doing. I swear, to me this looks like some strange anomaly....


    Thanks,
    Jerad

Page 2 of 2 FirstFirst 12

Tags for this Thread

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