Hi Jo-Anne,
Thank you for posting.
I have performed a test on this issue and confirmed that the problem is not
related to the project's conversion from VS 2003 to VS 2005.
In fact, when a control is dragged from toolbar and dropped onto the
TabPage2, what the VS IDE does is to generate some code such as creating
new control, adding it to the Controls property of the TabPage2, binding
the control to a data source and so on in the InitializeComponent method in
the inherited form.
I think if VS IDE couldn't generate all these corresponding code, the
drag&drop operation will be forbidden.
Since you could drag&drop regular toolbar controls onto the TabPage2 in the
inherited form, the code of creating controls and adding them to the
Controls property of the TabPage2 are able to generated.
You may have a try dragging the table from Data Source pane and dropping it
onto the inherited form itself to see if the drop operation works. If the
result is Yes, the code of the data binding is able to generated.
You may comment out all the code within the InitializeComponent method of
the inherited form and drag&drop the table onto the TabPage2.
Hope this helps.
Sincerely,
Linda Liu
Microsoft Online Community Support
============================================================================
=============================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
With newsgroups, MSDN subscribers enjoy unlimited, free support as opposed
to the limited number of phone-based technical support incidents. Complex
issues or server-down situations are not recommended for the newsgroups.
Issues of this nature are best handled working with a Microsoft Support
Engineer using one of your phone-based incidents.
============================================================================
=============================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Jo-Anne V - 19 Jul 2006 04:59 GMT
Linda,
Thanks for pointing me in the right direction. After much selective
commenting of code, I determined the problem was caused by a line in the
InitializeComponent routine. Believe it or not, the code was:
Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
One may wonder:
1. Why would that code appear in the InitializeComponent code of a base
(template) form?
2. Why does the Visual Studio designer even care?
As I mentioned, this is an existing application being converted from VS 2003
to VS 2005. I really can't speculate why someone thought that line was
needed. When I removed the line, I was able to drag and drop fields from the
Data Source window onto an inherited form. When I put that one line back in,
the drag problem reappeared. Surprising, to say the least.
I suppose the more intriguing question is why that code causes the VS 2005
IDE to think that it is unable to to place a new data bound control on the
inherited form. Since I spent quite a few hours on this issue already, I
will happily move on with my solution even though I don't fully understand
why it worked.
Thanks for your assistance.
Regards,
Jo-Anne V
> Hi Jo-Anne,
>
[quoted text clipped - 44 lines]
> =============================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
Linda Liu [MSFT] - 20 Jul 2006 14:17 GMT
Hi Jo-Anne,
Thank you for your update and detailed feedback. I am glad to hear that the
problem has been fixed.
I have performed a test based on your feedback and reproduced the problem.
I also found that I couldn't drag&drop table from the Data Sources panel
onto the inherited form as well. What's more, although I could drag&drop
common controls onto the inherited form, I couldn't resize these controls
on the inherited form with the Mouse.
If I set the WindowsState of the base form to Normal, the above problems
don't exist. Thus, if you want to set the WindowsState of the base form, I
recommend you to place the statement in the form's Load event handler.
I think it is an issue of VS2005. Thank you for reporting this to us.
If you have any other questions in the future, please don't hesitate to
contact us. It is always our pleasure to be of assistance.
Have a nice day!
Sincerely,
Linda Liu
Microsoft Online Community Support