Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - Using an enum typecoverter in an Excel PIA DLL

Reply
 
Old 10-19-2008   #1 (permalink)
GalleySlave


 
 

Using an enum typecoverter in an Excel PIA DLL

I would like to use a TypeCoverter to regionalise output for enums in an
assembly that is a PIA loaded into Excel.

I can run this and it works on an assembly in a test project I created with
an explicitly referenceed assembly, however when running a project that has
been built as an Excel PIA. If I try:
<System.ComponentModel.TypeConverter(GetType(ResourceEnumConverter))> _
public enum MyEnum
ItemA
ItemB
end enum

and in code
myE = MyEnum.ItemA
Dim converter As System.ComponentModel.TypeConverter =
TypeDescriptor.GetConverter(myE)

In the immidiate window
? converter.ToString() goves
"System.ComponentModel.EnumConverter"

whereas in my other project (also a strongly signed assembly, but referenced
directly from a newly created stub windows form project), I get

? converter.ToString
"ClassLibrary1.LocalizedEnumConverter"

so it look like the LocalizedEnumConverter is not being bound to the enum -
any ideas? Is this because of the way Excel loads the assembly, and is there
a way arounfd this?

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
problem with enum in web custom control .NET General
Vista Home Premium SP1 Enum System Security
Enum permissions - access denied General Discussion
How to view Excel document without Microsoft Office Excel installe Vista General
What is PS equivalent of switching on an enum value? PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46