Error creating window handle

C

CLWill

I am having the weirdest problem in VB 2003.

I have a whole number of applications that are having the same problem.
They work for a while, and then suddenly, for no reason at all I start
getting this weird startup and immediately die behavior. The window simply
flashes up there and the app goes away. Even when run in the debugger, it
just flashes. Apps that have been working for a long time, suddenly start
doing this, and it seems to be permanent once they start it.

I've turned on error trapping at the highest level in the runtime and it is
getting "first chance exception of type
'System.ComponentModel.Win32Exception' occurred in system.windows.forms.dll"
on the creation of the main form (or sometimes on a control's form). The
additional information is "error creating window handle".

The weird thing is, as I said, I have been working on an application all
day... starting, running, testing, debugging, editting, etc., etc. Then I
change one line that has nothing to do with anything, and it starts
happening. I change that line back, and it doesn't fix it.

I reboot my computer and it doesn't fix it. The application is permanently
screwed up.

I can create a brand new solution, copy all the other code into this new
solution, and it works perfectly. Eventually, however, it just starts
happening. I'm trashing applications left and right. Applications I've
used for years have started to do this!!

I've created a tiny test application that works just fine, until it gets to
the line in InitializeComponent that says:

Me.DataGrid1 = New System.Windows.Forms.DataGrid

If I comment the line out, the app starts and the window is there. If I
uncomment it, the app dies with this silly "error creating window handle"
error. If I create a new application with nothing but an empty datagrid in
it, it works fine...

What the hell is going on?

Anyone?
 
B

boris.unterer

Can't help, but have the same problem with C# .NET 2.0 under VS 2005 -
but the very same thing.

Enabling unmanaged code debugging (have no unmanaged piece of code
though) I get masses of

First-chance exception at 0x7a2b1160 in MyApplication.exe: 0xC0000005:
Access violation writing location 0x7c9037bb.
 
C

CLWill

I figured out what is causing it for me. I am running a Matrox Parahelia
128 video card, and Matroxes latest Powerdesk software is causing it. If I
uncheck the "automatically remember windows size/position", the applications
work fine. I have an error report into Matrox.

Don't know if this is your problem, but I'm thinking video driver at this
point :)
 
B

boris.unterer

oh thanks, that's great - I'm using Matrox Powerdesk as well - now
debugging works as before

I would have looked for ages after this problem
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top