Click here to Skip to main content
15,912,756 members
Home / Discussions / C#
   

C#

 
Generaldraw something over all Pin
Sasuko22-Jul-05 11:48
Sasuko22-Jul-05 11:48 
GeneralRe: draw something over all Pin
Christian Graus22-Jul-05 12:18
protectorChristian Graus22-Jul-05 12:18 
GeneralGUI Automation Driver for C# Pin
AndyPicch22-Jul-05 11:43
AndyPicch22-Jul-05 11:43 
QuestionHow to use unmanaged callback from C#? Pin
EssOEss22-Jul-05 9:47
EssOEss22-Jul-05 9:47 
AnswerRe: How to use unmanaged callback from C#? Pin
Alomgir Miah22-Jul-05 10:04
Alomgir Miah22-Jul-05 10:04 
GeneralRe: How to use unmanaged callback from C#? Pin
EssOEss22-Jul-05 10:35
EssOEss22-Jul-05 10:35 
AnswerRe: How to use unmanaged callback from C#? Pin
leppie22-Jul-05 11:17
leppie22-Jul-05 11:17 
GeneralRe: How to use unmanaged callback from C#? Pin
EssOEss22-Jul-05 11:36
EssOEss22-Jul-05 11:36 
AnswerRe: How to use unmanaged callback from C#? Pin
EssOEss22-Jul-05 22:43
EssOEss22-Jul-05 22:43 
GeneralUser Interface Problem Pin
Soumya Mulukutla22-Jul-05 9:21
Soumya Mulukutla22-Jul-05 9:21 
GeneralRe: User Interface Problem Pin
leppie22-Jul-05 11:20
leppie22-Jul-05 11:20 
GeneralSmall DataGrid question Pin
zaboboa22-Jul-05 8:53
zaboboa22-Jul-05 8:53 
GeneralRe: Small DataGrid question Pin
Alomgir Miah22-Jul-05 9:23
Alomgir Miah22-Jul-05 9:23 
GeneralRe: Small DataGrid question Pin
Srinivas Jonnalagadda23-Jul-05 8:08
Srinivas Jonnalagadda23-Jul-05 8:08 
GeneralDistributed Tiers cominication messages Pin
machocr22-Jul-05 7:45
machocr22-Jul-05 7:45 
GeneralC# UserControl in a Win32 Window Pin
dirkhelmet!@yahoo.com22-Jul-05 7:01
dirkhelmet!@yahoo.com22-Jul-05 7:01 
GeneralRe: C# UserControl in a Win32 Window Pin
Alomgir Miah22-Jul-05 7:39
Alomgir Miah22-Jul-05 7:39 
GeneralProblems Reading Cell Values from Excel Spreadsheets Using OleDB Pin
fmarcos22-Jul-05 6:55
fmarcos22-Jul-05 6:55 
GeneralRe: Problems Reading Cell Values from Excel Spreadsheets Using OleDB Pin
fmarcos22-Jul-05 7:18
fmarcos22-Jul-05 7:18 
Generalwriting to ms word document bookmarks Pin
xrado22-Jul-05 6:33
xrado22-Jul-05 6:33 
GeneralRe: writing to ms word document bookmarks Pin
Alomgir Miah22-Jul-05 7:50
Alomgir Miah22-Jul-05 7:50 
GeneralRe: writing to ms word document bookmarks Pin
sameerhanda25-Jul-05 17:15
sameerhanda25-Jul-05 17:15 
GeneralCombobox.DisplayName and Interfaces Pin
Miszou22-Jul-05 6:21
Miszou22-Jul-05 6:21 
I have a combobox that displays a list of dynamically loaded "plugin" objects, using the code below:

// Load the assembly.<br />
Assembly ControlLib = Assembly.LoadFrom( Location );<br />
<br />
// Create the plugin.<br />
object objPlugin = ControlLib.CreateInstance( ControlName );<br />
<br />
// Add the plugin to the combo box<br />
cboList.Items.Add( (IFTPlugin)objPlugin );


I have set the combobox "DisplayName" property to "Caption" (a member of the IFTPlugin interface), but it always calls ToString on the object instead and shows the assembly name instead of the friendly name.

I know that the object is loaded correctly, and that the "Caption" method is working, because I can call the following code and get the expected result:

string strCaption = ((IFTPlugin)objPlugin).Caption;

Rather than override the objects ToString function, is there a way to get the combobox to correctly call IFTPlugin.Caption ?

Thanks for your help.




The StartPage Randomizer

GeneralRe: Combobox.DisplayName and Interfaces Pin
malharone22-Jul-05 6:41
malharone22-Jul-05 6:41 
GeneralRe: Combobox.DisplayName and Interfaces Pin
Alomgir Miah22-Jul-05 7:42
Alomgir Miah22-Jul-05 7:42 

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.