Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form Control Inheritance? 1

Status
Not open for further replies.

jgoodman00

Programmer
Jan 23, 2001
1,510
I am writing a PocketPC app, & have a number of forms which load into a single panel control. These forms contain a series of tab-pages. Examples of tabs would be location, data, work etc.

The location tab is common for all types of record & every form needs a location tab, containing the same fields.

Is there a way to create a single location tab page & then use it for all of my forms so I dont have to modify them all manually?

James Goodman MCSE, MCDBA
 
Create your base form with the single tab page on and save it. Lets say its called FrmBase

All you have to do then, is to inherit this form. Create a new form, then change the line of code which reads Inherits Form to Inherits FrmBase. You will probably have to close and reopen the form in design view but thats all there is to it.




Sweep
...if it works dont mess with it
 
I tried this, but it wont then let me design the form. I need to use this base form & add the specific controls to certain parts.

When I try to open the form in design view I get the following error:

The designer could not be shown for this file because none of the classes within it can be designed. The designer inspected the following classes in the file:

frmTest --- The base class MobileApp1.frmBase' could not be loaded. Ensure the assembly has been referenced or built if it is part of the project.


Any ideas?

James Goodman MCSE, MCDBA
 
This was working when I last used it but now it is not.

I have my base form, frmBase.

I have my inherited forms.

When I attempt to 'design' my inherited forms I get 1 of 2 errors:

1. Ambiguous match found.
2. The Specified Cast Is Not Valid.


This is driving me mad as nothing has changed.

Any suggestions?

James Goodman MCSE, MCDBA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top