hi,

i have two form Form1 and Form2 that are inherited from FormParent. in FormParent i have a protected variable Modified which will be set to true whenever anything has been modified.

Form1 and Form2 are docked into tabpages. what i want to do is that when i close the tabpages, i want to get the Modified values of Form1 and Form2 to validate before allowing the tabpage to be removed.

how do i go about getting these values? i tried the following but it didn't get exposed:

((Form1)control).Modified
((FormParent)control).Modified

any idea?

thanks again in advance.

protected means just that: protected.
Only FormParent can use "Modified", nobody else.

If you need something else to see them they have to be public.

A possible solution could be to use events, to pass whatever you needed.

thanks. got it.

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.