InvalidCastException in Application.DoEvents() !!!!

L

Lloyd Dupont

I have a problem with one of my new form.
apparently I do something wrong. at some time.

anyway when I leave the screen (hide it, show an other)
I have an InvalidCastException

what's really puzzling is that the bug is Application.DoEvents() ...
I have no clue, whatsoever of the reason of the bug !

any idea how I could figure it out ?

here is my stack trace up to DoEvents()

what is strange is that it display without any problem but when I leave
System.Windows.Forms.dll!System.Windows.Forms.Control.WnProc(int hwnThis =
2359393, AGL.Form.WM wm = WM_PAINT, int wParam = 0, int lParam = 0) + 0x17e
bytes
System.Windows.Forms.dll!System.Windows.Forms.Control._InternalWnProc(int
hwnThis = 2359393, AGL.Form.WM wm = WM_PAINT, int wParam = 0, int lParam =
0) + 0xb bytes
System.Windows.Forms.dll!AGL.EVL.Yield()
System.Windows.Forms.dll!System.Windows.Forms.Application.DoEvents() + 0x6
bytes
 
K

Katie Schaeffer [MSFT]

Hi Lloyd,

Could you post the code inside your paint event for me to see? If you
comment everything out inside the paint event, do you still see the problem?

Thanks,
-Katie

This posting is provided "AS IS" with no warranties, and confers no rights.

***.Net Compact Framework Info***
Faq:
http://msdn.microsoft.com/mobility/prodtechinfo/devtools/netcf/FAQ/default.a
spx
QuickStarts: http://samples.gotdotnet.com/quickstart/CompactFramework/
Samples:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/h
tml/CompactfxTechArt.asp

--------------------
| From: "Lloyd Dupont" <net.galador@ld>
| Subject: InvalidCastException in Application.DoEvents() !!!!
| Date: Wed, 7 Jan 2004 11:17:52 +1100
| Lines: 25
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| NNTP-Posting-Host: adsl-11-233.swiftdsl.com.au 218.214.11.233
| Path:
cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08
..phx.gbl!tk2msftngp13.phx.gbl
| Xref: cpmsftngxa07.phx.gbl
microsoft.public.dotnet.framework.compactframework:42316
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| I have a problem with one of my new form.
| apparently I do something wrong. at some time.
|
| anyway when I leave the screen (hide it, show an other)
| I have an InvalidCastException
|
| what's really puzzling is that the bug is Application.DoEvents() ...
| I have no clue, whatsoever of the reason of the bug !
|
| any idea how I could figure it out ?
|
| here is my stack trace up to DoEvents()
|
| what is strange is that it display without any problem but when I leave
| System.Windows.Forms.dll!System.Windows.Forms.Control.WnProc(int
hwnThis =
| 2359393, AGL.Form.WM wm = WM_PAINT, int wParam = 0, int lParam = 0) +
0x17e
| bytes
|
System.Windows.Forms.dll!System.Windows.Forms.Control._InternalWnProc(int
| hwnThis = 2359393, AGL.Form.WM wm = WM_PAINT, int wParam = 0, int lParam =
| 0) + 0xb bytes
| System.Windows.Forms.dll!AGL.EVL.Yield()
| System.Windows.Forms.dll!System.Windows.Forms.Application.DoEvents() +
0x6
| bytes
|
|
|
 
L

Lloyd Dupont

Hi Katie,

Sorry but the code is actually quite complex and even though I correct the
bug, by changing the one line which could have hold a casting problem, I
still have no idea how the problem happened where it does ...
 

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