Results 1 to 8 of 8

Thread: Why not every form

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2002
    Location
    Sweden
    Posts
    15

    Unhappy Why not every form

    Hello! I have a problem with VB. Net and a project that I am converting from VB6. I have a few modal forms. Thay are open as, for example:

    '********************
    Dim objfrm1 As frm1

    objfrm1 = New frm1()
    objfrm1.ShowDialog()
    '********************

    Every form have a event for Load, that does (or should do) some things every time the form is opened. The declaration for the event look like this:

    '********************
    Public Sub frm1_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
    '********************

    My problem is that some of the forms doesn't go into the event, or what you now should call it, so the things that are supposed to occur don't occur.

    I have compare the forms that works with the one that doesn't work, but I can't find any differences between them.

    Does anyone know what the problem is and what I should do to do so that the Load event occur for all forms.

    Very grateful for all help!

    /Anders Thornell

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Post the code for both and we'll try to help.

  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 2002
    Location
    Sweden
    Posts
    15
    Ok, here are the code for two of the forms. frmAlternativ is the one that doesn't work, and frmFiler_Skapa is the one that works perfectly. I attach the forms *.vb-fiels in a zip-archive.

    /Anders
    Last edited by AndersThornell; Nov 5th, 2002 at 05:51 PM.

  4. #4
    Hyperactive Member
    Join Date
    Feb 2002
    Posts
    261
    Originally posted by AndersThornell
    Ok, here are the code for two of the forms. frmAlternativ is the one that doesn't work, and frmFiler_Skapa is the one that works perfectly. I attach the forms *.vb-fiels in a zip-archive.

    /Anders
    As soon as I load these forms into VS.NET, the Task List shows at least a million errors in frmFiler_Skapa (it even says 'Maximum number of errors has been exceeded.'). All of the exceptions have to do with something not being declared.

    My guess is that these forms are using at least 1 other module. I cannot get them to work until you upload that too.

  5. #5

    Thread Starter
    New Member
    Join Date
    Nov 2002
    Location
    Sweden
    Posts
    15
    Sorry, my mistake. I have done a new zip-file with four forms from a much bigger project. Two of the forms if working perfectly and the two others have the problem i described in my first message. The two forms that I have problem with are the forms that are open when you click either "Alternativ" or "Kalkylatorn" in the menu in the first form.

    You will notice my problem if you load one of this form and you find a star "*" in front of some labels, if there are any stars, the form does not have the problem I wan't to solve.

    /Anders
    Attached Files Attached Files

  6. #6

    Thread Starter
    New Member
    Join Date
    Nov 2002
    Location
    Sweden
    Posts
    15
    Isn't there anyone who can help me solve this problem? I don't know what to do about it anymore!

    /Anders

  7. #7
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    That is very wierd but I found the cause:
    http://support.microsoft.com/default...;en-us;Q318386

    You should avoid using activeX controls wherever possible in .net for reasons like this. Hopefully one of those fixes will help.

    Overriding the WNDPRC worked and is nice and easy.

  8. #8

    Thread Starter
    New Member
    Join Date
    Nov 2002
    Location
    Sweden
    Posts
    15
    Thank you so muck, I am going to try this as soon as possible.

    I never thought about that there could be any problem with the activeX controls, because I have deactivate one of the controls in one of the forms and I have never used it, so I never notice that the control is there.

    Thanks again!

    /Anders

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