View Single Post
  #9 (permalink)  
Old 03-26-2008, 06:24 PM
agraham's Avatar
agraham agraham is offline
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,055
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

I was experimenting to see if I really needed a fully qualified Assembly name for CreateNew2.

I can successfully make a DirectoryInfo object and invoke a method using just the assembly name for mscorlib.
Code:
ofrm.CreateNew2("System.IO.DirectoryInfo,mscorlib", args.Value)
Msgbox(ofrm.RunMethod("ToString"))
But if I try, slightly modified from a sample
Code:
oIcon.CreateNew2("System.Drawing.Icon,System.Drawing", args.Value)
I get a "Could not load file or assembly 'System.Drawing" error. Any idea why the difference Erel?

EDIT :- Note that, undocumented in Erel's first post, you do get the return value of a RunMethod call - I'll wait and see what happens for some of the more esoteric returned objects

Last edited by agraham : 03-26-2008 at 06:34 PM.
Reply With Quote