Click here to Skip to main content
15,922,894 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi..
I am woking in VB.NET2008.. In my Project add a Menustrip to give all report name and using Tabcontrol to view by clicking the report.. In that runtime i am clicking reportname an exception is occur..
"dragdrop registration did not succeed"
"Top-level control cannot be added to a control."

This type of exception occur so didnt view the report
What the reason???
-----------------------------------
i already sent a above question??For that reply answer with two more line coding but i was given in form_load
this type of exception occur..
"Failed to set the specified COM apartment state"
Posted

1 solution

Look at your code, do you have [System.STAThread] or just [STAThread] before your entry point (usually Main)?

If not, add it.

If this does not solve your problem, show your code, try to catch exception and provide exception dump. Don't forget to indicate code line(s) where exception is thrown.

—SA
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900