Form Object Access From Class Method

talktodale

New member
Joined
Oct 22, 2009
Messages
2
Location
Orlando, Florida
Programming Experience
10+
I want a string and a listbox, both which are in a form to be modified by an instance of a class method. Should (could I):

1. Pass the entire form to the class method as parameter.

or

2. Pass the listbox and the string to the method as parameters.

What's the best approach to get access and modify this string and listbox on the form.
 
Passing the least amount would be the most reasonable. More info may yield a better solution.
 
I think passing the string and listbox object as a parameter to the class instance would be better instead of passing entire form.
 
I appreciate the answers. Sounds like I am approaching this the right way. The more OOP I do, the more confident I will be and not have to ask these questions. Switching from procedural programming (23 years) to Object Oriented Programming is difficult and you are better off if you never did procedural programming. It's actually not the programming of OOP that is difficult, it is the overall design and layout and information hiding that has given me difficulty. Thanks again.
 
Back
Top