Click here to Skip to main content
15,909,205 members
Home / Discussions / C#
   

C#

 
Questionhow to call functions in unmanaged C++ dll from C# app Pin
moniqui9-Aug-06 8:09
moniqui9-Aug-06 8:09 
AnswerRe: how to call functions in unmanaged C++ dll from C# app Pin
Judah Gabriel Himango9-Aug-06 9:01
sponsorJudah Gabriel Himango9-Aug-06 9:01 
GeneralRe: how to call functions in unmanaged C++ dll from C# app Pin
moniqui9-Aug-06 9:30
moniqui9-Aug-06 9:30 
GeneralRe: how to call functions in unmanaged C++ dll from C# app Pin
Judah Gabriel Himango9-Aug-06 13:08
sponsorJudah Gabriel Himango9-Aug-06 13:08 
GeneralRe: how to call functions in unmanaged C++ dll from C# app Pin
moniqui10-Aug-06 10:59
moniqui10-Aug-06 10:59 
GeneralRe: how to call functions in unmanaged C++ dll from C# app Pin
Judah Gabriel Himango11-Aug-06 4:29
sponsorJudah Gabriel Himango11-Aug-06 4:29 
AnswerRe: how to call functions in unmanaged C++ dll from C# app Pin
Eric Dahlvang9-Aug-06 10:35
Eric Dahlvang9-Aug-06 10:35 
QuestionUser controls, delegates and the designer Pin
Wjousts9-Aug-06 5:20
Wjousts9-Aug-06 5:20 
I have a user control that I have created as a way to plot a function. To make it flexible I defined a delegate that actually represents the function so I can use the control for different functions:

public delegate double Function(double x, double y);


In my control I add a property for the function:

<code>
private Function function;
[Browsable(false)]
public Function Function
{
    get { return function; }
    set 
    {
        function = value;
    }
}


So far so good, I also add a default constructor that specifies a default method to use for the function. I can create a form, add my control to it and run it and it works. The problem is if I any of the properties of the control in the designer, the designer thoughtfully adds this line to the form class:

<code>
this.functionPlot1.Function = ((Function)(resources.GetObject("functionPlot1.Function")));


And this causes a problem in the designer because the GetObject always seems to return null which results in the designer giving me the slightly comical message:
Object of type 'Function' cannot be converted to type 'Function'WTF | :WTF:

Does anybody know what's going on here and how to fix it. I'm not that bothered if I can't see the function being plotting in the designer (but it would be nice if I could), but I'd like to be able to see the rest of the form, but this error stops that. Removing the offending line from the InitalizeComponents method fixes the problem temporarily, but it keeps coming back whenever I change anything.

Thanks.
AnswerRe: User controls, delegates and the designer Pin
Ed.Poore9-Aug-06 5:25
Ed.Poore9-Aug-06 5:25 
GeneralRe: User controls, delegates and the designer Pin
Wjousts9-Aug-06 5:27
Wjousts9-Aug-06 5:27 
GeneralRe: User controls, delegates and the designer Pin
Ed.Poore9-Aug-06 5:32
Ed.Poore9-Aug-06 5:32 
GeneralRe: User controls, delegates and the designer Pin
Wjousts9-Aug-06 6:38
Wjousts9-Aug-06 6:38 
GeneralRe: User controls, delegates and the designer Pin
Ed.Poore9-Aug-06 11:47
Ed.Poore9-Aug-06 11:47 
Questiontest connection Pin
Sandrina9-Aug-06 4:55
Sandrina9-Aug-06 4:55 
AnswerRe: test connection Pin
Ed.Poore9-Aug-06 5:22
Ed.Poore9-Aug-06 5:22 
GeneralRe: test connection Pin
Sandrina9-Aug-06 21:38
Sandrina9-Aug-06 21:38 
GeneralRe: test connection Pin
Ed.Poore9-Aug-06 22:02
Ed.Poore9-Aug-06 22:02 
AnswerRe: test connection Pin
Not Active9-Aug-06 5:38
mentorNot Active9-Aug-06 5:38 
GeneralRe: test connection Pin
Sandrina9-Aug-06 21:41
Sandrina9-Aug-06 21:41 
Questionconsole.writeline Pin
Harvey Turtle9-Aug-06 3:38
Harvey Turtle9-Aug-06 3:38 
AnswerRe: console.writeline Pin
stancrm9-Aug-06 3:45
stancrm9-Aug-06 3:45 
AnswerRe: console.writeline Pin
V.9-Aug-06 3:52
professionalV.9-Aug-06 3:52 
GeneralRe: console.writeline Pin
Harvey Turtle9-Aug-06 3:58
Harvey Turtle9-Aug-06 3:58 
AnswerRe: console.writeline Pin
Ed.Poore9-Aug-06 5:27
Ed.Poore9-Aug-06 5:27 
QuestionFOR XML returns query with no root, whats the best way to add one before loading it to an XMLDataDocument? Pin
Red_Wizard_Shot_The_Food9-Aug-06 3:26
Red_Wizard_Shot_The_Food9-Aug-06 3:26 

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.