Results 1 to 2 of 2

Thread: Error creating window handle.

  1. #1

    Thread Starter
    Fanatic Member venerable bede's Avatar
    Join Date
    Sep 2002
    Location
    The mystic land of Geordies
    Posts
    1,018

    Error creating window handle.

    I use the following code to open a winform:

    Dim abForm As New frmArchive()
    abForm.MdiParent = Me
    abForm.Show()

    The problem I have is that when i run the code I get
    " Error creating window handle."

    I use the above 3 lines all the time and have never had problems in the past,

    Any Ideas Anyone

    Thanks in Advance

    Parksie

  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    I have found that odd errors occur when you are trying to create an show a form that has errors in it. You know the code works, so the first place I would go would be to the form's constructor or load event. Step through that code as the form is being created and shown. You will most likely find your problem there.

    I was having some really wierd errors with this code (C#):
    FormMain f = new FormMain();
    f.ShowDialog(this);
    The compiler kept telling me there was a problem with that code, but the problem was really in the FormMain class's constructor. I knew that code worked because I used it to show dialogs all the time. Just thatone time it kept thowing an error.

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