Click here to Skip to main content
16,004,977 members
Home / Discussions / C#
   

C#

 
GeneralRe: Framework 1.0 vs Framework 1.1 Pin
Alex Getman11-May-04 6:27
Alex Getman11-May-04 6:27 
GeneralRe: Framework 1.0 vs Framework 1.1 Pin
Heath Stewart11-May-04 6:44
protectorHeath Stewart11-May-04 6:44 
GeneralFile preview in windows explorer Pin
pedery11-May-04 5:21
pedery11-May-04 5:21 
GeneralRe: File preview in windows explorer Pin
Heath Stewart11-May-04 7:08
protectorHeath Stewart11-May-04 7:08 
GeneralRe: File preview in windows explorer Pin
pedery19-May-04 6:03
pedery19-May-04 6:03 
GeneralRe: File preview in windows explorer Pin
Heath Stewart19-May-04 6:15
protectorHeath Stewart19-May-04 6:15 
GeneralWindows form Usercontrol hosted in IE Pin
Tim Kohler11-May-04 5:20
Tim Kohler11-May-04 5:20 
GeneralRe: Windows form Usercontrol hosted in IE Pin
Heath Stewart11-May-04 6:50
protectorHeath Stewart11-May-04 6:50 
Yes, it is possible. You must use automation interfaces in your contro, however, so that scripting engines can access them. See my old article at DevHood, User Controls for Winodws and the Web[^].

Keep in mind that you must follow COM guidelines, and writing for COM dictates that you should use good practices in .NET as well, such as never changing a published interface (instead, derive a new one and call it IMyInterface2 or something allow those lines), and NEVER use auto-generated class interfaces. Microsoft does this in their samples, but if you read deeper (or have any experience in COM and COM interop with .NET), you'll see they tell you not too (nice, huh?). Because you can change the relative locations of properties and methods in .NET without affecting functionality, this is fine. But it screws-up auto-generated interfaces since methods and properties will be in a different VTBL order, and possibly will have different DISPIDs (if you don't explicitly set them with the DispIdAttribute). My article covers this a little as well.

You can expose methods, properties, and even events this way. Just give your OBJECT tag an ID and you can script it. You can hook-up event handlers using attributes or through scripting. My article covers this as well.

For a little more information on following COM guidelines in .NET (since that wasn't really the focus of my article), see Nick's article, Creating a CCW for COM-Enabled, non-.NET Applications[^]. Nick even added what I mentioned above into his article, you might notice. Smile | :)

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Windows form Usercontrol hosted in IE Pin
Tim Kohler11-May-04 8:40
Tim Kohler11-May-04 8:40 
GeneralRe: Windows form Usercontrol hosted in IE Pin
Heath Stewart11-May-04 8:45
protectorHeath Stewart11-May-04 8:45 
GeneralRe: Windows form Usercontrol hosted in IE Pin
Tim Kohler12-May-04 3:10
Tim Kohler12-May-04 3:10 
GeneralRe: Windows form Usercontrol hosted in IE Pin
Heath Stewart12-May-04 3:52
protectorHeath Stewart12-May-04 3:52 
GeneralRe: Windows form Usercontrol hosted in IE Pin
Tim Kohler12-May-04 4:00
Tim Kohler12-May-04 4:00 
GeneralRe: Windows form Usercontrol hosted in IE Pin
Heath Stewart12-May-04 4:29
protectorHeath Stewart12-May-04 4:29 
GeneralRe: Windows form Usercontrol hosted in IE Pin
Tim Kohler12-May-04 4:56
Tim Kohler12-May-04 4:56 
GeneralRe: Windows form Usercontrol hosted in IE Pin
Heath Stewart12-May-04 5:27
protectorHeath Stewart12-May-04 5:27 
GeneralRe: Windows form Usercontrol hosted in IE Pin
Tim Kohler12-May-04 15:40
Tim Kohler12-May-04 15:40 
GeneralRe: Windows form Usercontrol hosted in IE Pin
Heath Stewart13-May-04 2:02
protectorHeath Stewart13-May-04 2:02 
GeneralRe: Windows form Usercontrol hosted in IE Pin
Tim Kohler14-May-04 10:53
Tim Kohler14-May-04 10:53 
GeneralRe: Windows form Usercontrol hosted in IE Pin
Heath Stewart14-May-04 11:00
protectorHeath Stewart14-May-04 11:00 
GeneralTooltip Pin
bertcox11-May-04 4:32
bertcox11-May-04 4:32 
GeneralMessage Removed Pin
11-May-04 4:45
wibblewibblewibble11-May-04 4:45 
GeneralRe: Tooltip Pin
Heath Stewart11-May-04 4:50
protectorHeath Stewart11-May-04 4:50 
GeneralMessage Removed Pin
11-May-04 4:55
wibblewibblewibble11-May-04 4:55 
GeneralRe: Tooltip Pin
Heath Stewart11-May-04 4:57
protectorHeath Stewart11-May-04 4:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.