Skip to content

System.ComponentModel.Win32Exception: 'Error creating window handle.' #2

@PiporGames

Description

@PiporGames

I tried adding the UserControl but whenever I add it to my form, both with the designer and without, the app crashes with System.ComponentModel.Win32Exception: 'Error creating window handle.'

It appears this happens when trying to get Me.Handle inside the main code.
I've tried on my own project, and on a new clean one with nothing inside. Added the required reference needed for it to work, and no luck. The only time it works is when directly ran from the source project you've provided. I've tried comparing side by side every file inside your project source and a blank project and even tho they seem to be identical, it only works on yours, but not on the blank one.

Do you have any idea on why this happens? I think the Me.Handle failing might hint a clue.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions