"Form.Load event" (?)

Discussion in 'Questions (Windows Mobile)' started by mjcoon, Sep 27, 2009.

  1. mjcoon

    mjcoon Well-Known Member Licensed User

    When I initialise a form with a table in it, I want the default selected cell not to be cell (0, 0) but one of the others, so I put the SelectCell in the same Sub that was establishing all the other aspects of the table.

    When I tried to run it (under the desktop IDE) I got a very specific pop-up error message. The problem is that I don't understand it because it refers (see thumbnail) to a "Form.Load event" and I can't find this; it isn't listed as an event against a form.

    TIA, Mike.

    Attached Files:

  2. agraham

    agraham Expert Licensed User

    It is probably due to the order you are doing things in which you haven't detailed. Try moving the initialisation into a Form Show event (you may need a first time flag check) or place it after Form.Show and see if the problem goes away.
  3. mjcoon

    mjcoon Well-Known Member Licensed User

    Thanks, Andrew, I was indeed doing it before the Form.Show and moving it to afterwards cured my problem.

    Does that make it a misleading (given it was so specific) error message?

    Cheers, Mike.
  4. agraham

    agraham Expert Licensed User

    Probably but but in this case Erel can't do much about it as that is the message from the Exception that is being thrown by the .NET Framework itself at runtime.
  5. mjcoon

    mjcoon Well-Known Member Licensed User

    Ah, I see, I had wondered if this mysterious event was one that I could have got access to (had that been the only solution) via one (other) of the additional libraries (to those I'm already using!).

    Cheers, Mike.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice