Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Question about accessing form objects...
Message
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
00736154
Message ID:
00736160
Views:
15
Hi Kevin,

In your method inside your Form_B_Logic class, make sure you are receiving the actual Form B class and not just Form. If you define the receiving parameter to be of type "Form" then you only see the properties and methods of the Form class.

>I'm sure this is a simple one, but to this day I'm still missing it.
>
>Let's say I have Form 'A', the main MDI parent. Someone launches Form 'B', an MDI child form.
>
>Form B is a complex form with a fair amount of business logic. I'd like to be able to take all the business logic and create a separate class module [something like Form_B_Logic]. The logic in this class would need to 'see' and read the contents of the controls in Form B. And that's where I get stuck...if I pass the form object as a parameter from Form 'B' to the Form B Logic class, the class doesn't see any of the controls on Form 'B'.
>
>Again, I just want to create a class of rules for each form, where the class can examine the form object and 'see' all the controls underneath. That way, the form itself has nothing more than the controls and function calls to the form class logic. It's one of these cases where I knew how to do this in VFP, but haven't figured out how to implement in .NET.
>
>Thanks,
>Kevin
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform