is there way (in vb6) encapsulate control within form consumers of form cannot modify properties of control on form?
e.g if have form named form1 button named command1, how prevent consumers (of form1) doing this:
form1.command1.enable = true i rather want expose method enablecommand() , let method decide whether valid operation enable command or not.
most other languages control on form private default, how can 1 make control private in vb6?
no, there's no easy way. in vb.net can set access modifier of controls in form designer, can't in vb6.
in big application, can subdivide logic separate components (typically dlls). other components wouldn't have access form @ all, including controls.
Comments
Post a Comment