Hi

Here's my problem.. I'm working in Vs2010 C# with Tabcontrols and shapes from the VbPowerPack, so when i try to drop any textbox above the shape in the tab 2 it goes to the tab 1, i already tried selecting the 2nd tab before drop it and nothing, same thing, it's really annoying, if somebody know how to fix this please let me know, if you didn't understand please tell me so i can explain better, i'm a Spanish speaker..

Recommended Answers

All 12 Replies

I can't recreate this behaviour. Ensure the Tab2 is selected first before adding into the TabControl and it should work. Else could you provide a screen shot of what is happening.

Hi thanks for the Quick response, look is a very weird behaviour i don't think it can be showed in a screen shot but like i explained i already tried selecting the second tab first and then pasting the textbox avobe a shape it goes to the first tab.. here is the screen shot to get an idea, as you see there are shapes and textbox.. http://ScrnSht.com/gweoen

Hmm it is a weird behaviour indeed. Im going to have to say im stumped at present as to why it does it? Not enough room on form maybe? But that would be silly as should be able to layer items etc.

Very weird, this never happened to me in foxpro, But we need to move on.. I'm uploading a video so you can see the problem, please stay online..

Hmm I'm afraid I've got no clue as to why that is occuring.

Try removing the shapes and drawing the shapes using System.Drawing and see if that fixes the problem. I've never used the vbPowerPack stuff so I'm not sure if that could be the cause, but wasn't the vbPowerPack stuff supposed to be used with VB only? I didn't even know it worked in C#...I just assumed it was for vb considering the name.

Anyway, I would remove the vb shapes (and the project reference, at least temporarily) and try drawing the rectangles yourself and see if that fixes it.

Isn't there any c# native shape control? when you say draw the shapes by myself, you mean programaticly?

Yes, programmaticly.

I don't know of any shape controls that show on the design surface other than the vb ones, but the methods to draw shapes in C# are in the system.drawing.graphics class. You could make your own control? Or use a panel if you want a rectangle, but that would change how you access the controls in the panel.

I have a rectangle control that I've used in the past that will let you drag and drop from the toolbox to the design surface, but I'd have to find it again. If you are interested in that I can post the code (or link to the dll).

Yes, the code or the dll would be helpfull.. thanks zachattack05 and MikeIsMe.

Yes i can make my own controls i'm gonna try it now..

Man i have a Question, if i do my own control, i put a shape and a textbox avobe and thats it, but how can i handle the binding stuff.. i do it in this way textEmaile.DataBindings.Add("Text", tabla.DefaultView, "emaile"); where tabla is a Datatable, but in a user control i would have to make my own methods and i don't know how i can handle the binding..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.