Click here to Skip to main content
15,892,480 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,
base form frmBase has datagridview, save-button, ok-button, cancel-button
derived form frmApp adds a new button
all frmBase - controls have modifier set to protected
everythings ok
since datagridview varies from frmApp to frmApp (right now there's only one, but there'll be more) i put the frmBase-controls on a panel. thus it's easier (i think)
to resize frmBase.
however with this when running frmApp, the buttons of frmBase are not visible, only
the derived form's button.
any suggestions waht's missing here
thanks in advance
Posted
Comments
BillWoodruff 3-Nov-14 8:27am    
First, check the Visible, Enabled, Location, Size, Properties of all the Controls on your base Form. Anything "unusual" ?
fheyn 3-Nov-14 8:58am    
hi,
buttons properties are as the were before i used the panel
right now removing the buttons or the panel will not update the designer-files correctly
BillWoodruff 3-Nov-14 9:27am    
Curious what version Visual Studio and FrameWork are you using ?
fheyn 3-Nov-14 10:09am    
vs 2008 express
fw 3.5
BillWoodruff 3-Nov-14 10:30am    
Sometimes, in every version of Visual Studio I've used (2008,2010,2012) except the current one (2013), I have had, at some time, a WinForms project get corrupted, and yet I could still access its files ... just couldn't build it, or run it.

The only thing I found I could do in these circumstances was just to recreate the project step by step, by starting a new Project, and then copy-pasting in content of the Designer.cs file, the Form.Designer.cs files, the Form, UserControl, code files content, etc.

I hope you don't have to do that here, but it can happen.

1 solution

This isn't anything we can directly solve - we would need to look at your code to do that and we can't access your HDD from here! :laugh:

So...some starter idea.

Start by checking the location of the panel - is it visible within the display confines of the derived form?

Can the derived form code access the panel?

Have you put the base form in a different assembly and forgotten to build it?

Have you created an instance of the base form and seen all your controls on that?
 
Share this answer
 
Comments
fheyn 3-Nov-14 7:22am    
thanks for your answer
1 : yes, 2 : yes, 3 : no
4 : when using instance of base form, form is display correctly
then i added another panel that holds three radio buttons that is display correctly too when using frmApp.
will it help to post designer-code of the two forms ?
OriginalGriff 3-Nov-14 7:31am    
Or zip the project and stick it on Dropbox, perhaps.

Have you tried closing VS, opening it again and doing a full clean and rebuild?
It sounds like the version of the base class the derived is referencing is not the same as the one you are viewing. I think I've seen that before, but in that case it was a VS error and it took some serious faffing to fix...what version of VS are you using?
fheyn 3-Nov-14 8:12am    
vs 2008 express
i think it's sommething with the buttons
put one of the buttons to the second panel and it wont't show either
put a radiobutton to the first panel and its displayed correctly.
OriginalGriff 3-Nov-14 8:27am    
Try a zip and I'll load it here.
I'm running 2010, but it can open 2008 solutions.
fheyn 3-Nov-14 8:49am    
there's no secret to this, but the whole project is BIG, uses several DLLs and uses SQL server 2005 database.
this summer i tried to install it on a friends computer so he could do some testing for me but i could'nt get it going.
frmApp actually is a form which is called form an application which is called from the main program.

right now i'm really stuck
removing the buttons from the panel will give

bei System.Windows.Forms.Control.ControlCollection.GetChildIndex(Control child, Boolean throwException)
bei System.Windows.Forms.Control.ControlCollection.SetChildIndexInternal(Control child, Int32 newIndex)
bei System.Windows.Forms.Control.ControlCollection.SetChildIndex(Control child, Int32 newIndex)
bei System.Windows.Forms.Design.ControlDesigner.DesignerControlCollection.SetChildIndex(Control child, Int32 newIndex)

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


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