PC Review


Reply
Thread Tools Rate Thread

Debugging a problem adding a Usercontrol to a form

 
 
Just Me
Guest
Posts: n/a
 
      16th Aug 2004
I have a large Usercontrol that I just converted from VB6 (so I'm not
surprised there are bugs in it.)

When I try to add an instance to a form I get an exception occurred trying
to create and instance, "Specified cast not valid"


If it happened at runtime I would breakpoint and single step to find the
statement causing the problem.

What can I do at design time to localize the bug?



Thanks


 
Reply With Quote
 
 
 
 
Cor Ligthert
Guest
Posts: n/a
 
      17th Aug 2004
Hi Just me,

Do you have option Strict On in all your forms?

Cor

> I have a large Usercontrol that I just converted from VB6 (so I'm not
> surprised there are bugs in it.)
>
> When I try to add an instance to a form I get an exception occurred trying
> to create and instance, "Specified cast not valid"
>
>
> If it happened at runtime I would breakpoint and single step to find the
> statement causing the problem.
>
> What can I do at design time to localize the bug?
>
>
>
> Thanks
>
>



 
Reply With Quote
 
Cor Ligthert
Guest
Posts: n/a
 
      17th Aug 2004
Did you see that there is a chat about debugging today/tomorrow depending on
your timezone

Message from Jason Cooke.

[ANN] August 17, "Debugging Visual Basic .NET Applications" chat

Join members of the Visual Basic .NET and Debugging teams to discuss
debugging Visual Basic .NET applications with the Visual Studio .NET
Debugger. Almost every program will need to be debugged sometime, so take
this opportunity to learn more about debugging from the experts.

Date:
August 17, 2004
1:00 - 2:00 P.M. Pacific time
4:00 - 5:00 P.M. Eastern time
20:00 - 21:00 GMT
(For a list of local time zones relative to GMT, please see
http://msdn.microsoft.com/chats/timezones.asp.)

Outlook Reminder:
http://msdn.microsoft.com/chats/outl...ET_Aug1704.ics

Location:
http://msdn.microsoft.com/chats (then click the name of the chat to enter
the chat room)

For more information about Visual Basic .NET, see
http://msdn.microsoft.com/vbasic/
To see a list of upcoming chats or set a reminder for this chat, see
http://msdn.microsoft.com/chats.
For archives of previous chats, see
http://msdn.microsoft.com/chats/recent.asp.

Thanks!
Jason Cooke
VB.NET Team

========
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
(c) 2004 Microsoft Corporation. All rights reserved.





 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Debugging UserControl Steve Long Microsoft VB .NET 3 9th Nov 2006 04:54 PM
Problem loading VB.NET UserControl in WebBrowser on Windows Form Mark Microsoft Dot NET 0 14th Jul 2006 07:30 PM
Problem loading VB.NET UserControl in WebBrowser on Windows Form Mark Microsoft Dot NET 0 14th Jul 2006 06:20 PM
Having a problem merging a ContextMenuStrip for a UserControl to the MenuStrip on the form academic Microsoft VB .NET 0 3rd Mar 2006 01:56 PM
Manually adding usercontrol to panel on form tonny.steen@invenia.no Microsoft Dot NET Framework Forms 1 29th Jun 2005 03:09 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:48 PM.