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?
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?