Inherited Form Resize problem
Please find the Zipped file containing the sample projects where I am tried to reproduce the problem I am facing.
You please download the Zip file from
http://vbcity.com/forums/attachment.asp?id=18886
OR from
http://www.msnusers.com/CSharpLearnerGroup/Documents/SampleBaseFormFieldAdded.zip
OR from
http://www30.brinkster.com/mahapatra/files/SampleBaseFormFieldAdded.zip
The zipped file contains one Class library project and another test Project (SampleBaseFormTest) to test the Class library project. The class library contains a Form which I inherits in the test project.
Open the SampleBaseForm.sln and run it. Take the screen shot of the form. Now reduce the form size a bit of frmMainTest.cs. Rebuild the solution. You will find the inherited controls are disturbed on the form. This happens only when the form is resized.
Please help me to identify why this is happening and how I can overcome this problem.
Thanking you for your kind help,
Pranab
[1622 byte] By [
Pra_na_b] at [2008-1-10]
If you don't want the Designer to move controls in a base control or a user control, make the individual controls in that base/user-control private instead of protected. The default is protected. To change it, select the control on the base (frmMainBase.Hellobutton, for example) show the properties, scroll down until
Modifiers is visible, click Modifiers and select
Private. Now derived forms can't set the position of those controls. This will likely cause compile errors because the designer has automatically positioned those controls based on their Dock or Anchor properties. You'll have to manually delete code in frmMainTest.Designer.cs to remove those compile errors.
Peter,
Thank you very much for your time. The solution provided by you is working up to some extend.
Purpose of frmMainBase form is to serve as a template for data entry screen.
frmMainBase.Hellobutton is also an template. During run time the button text will change and show number of modified records since last visit. On clicking the button it will display the list of those records which has been modified since the last visit of the logged on user.
Similarly the text of frmMainBase.label2 needs to be changed on the derived form to Book ID or Staff ID based on the underlying data. ToolTips also provided to give tip for that field.
By changing the Modifiers from Protected to Private, we can not able to do the above intended activities.
Please guide us, how we can achieve the required result.

Thanks Peter,
Yes, that is a good work arround. Today we tested the component after compiling in VS2003. It is behaving as expected, there is no issue as we are facing with VS2005. We are planning to use this class library which was compiled using VS2003. Any one see any problem?
Thanks for your guidance.