If you don't know at all about the form type how do you know it will provide
methods such as "GetXValue" ?
Clearly it won't work with a from that doesn't provide this method.
I'm still not sure about what you are doing but generally this is done in a
way such as :
- you create a class MyForm that inherits from Form and you add the required
functionnality
- the "sub" uses a MyForm type form as an argument
Now if someone calls your sub, he have to use a MyForm (or a MyForm child
class) object. Inheriting from MyForm will guarantee the form has the
methods required by tour sub...
The caller is not the problem. The argument itself is not really a problem
as it is passed to you. A possible problem is to be able to ensure as soon
as possible that the form has the required methods added to it (it seems to
me that your sub requires the form to have additional methods). Would be
cleaner...
--
Patrice
"Tim" <Ci************@gmail.com> a écrit dans le message de news:
11**********************@u72g2000cwu.googlegroups. com...
slight problem is...
I have no idea of the calling exe or dll.
I have no idea of the type of form, where it is or where it comes from.
The only single solitary thing I have is the form object passed as a
parameter to an unrelated sub in an unrelated exe.
I have no other reference at all to the calling exe or form.
Tim