Click here to Skip to main content
16,020,114 members
Home / Discussions / C#
   

C#

 
QuestionProgress Bar Pin
Sean895-May-06 18:42
Sean895-May-06 18:42 
AnswerRe: Progress Bar Pin
Phil C5-May-06 19:29
Phil C5-May-06 19:29 
GeneralRe: Progress Bar Pin
Rob Philpott5-May-06 20:52
Rob Philpott5-May-06 20:52 
GeneralRe: Progress Bar Pin
Phil C5-May-06 21:05
Phil C5-May-06 21:05 
GeneralRe: Progress Bar Pin
Sean896-May-06 5:27
Sean896-May-06 5:27 
Questionhow to handel keypress withine axwebbrowser Pin
smr855-May-06 15:23
smr855-May-06 15:23 
QuestionWebBrowser.DocumentStream problem Pin
Phoen255-May-06 12:43
Phoen255-May-06 12:43 
QuestionHow can I assign third party Events to my custom event Pin
Willowsword5-May-06 12:38
Willowsword5-May-06 12:38 
How can we assing my custom event to a third party event;
I am using Secure Black box for PGP projects and in C++ I can do something like

Reader->OnCreateOutputStream = DecryptStreamNeeded;

Where Reader->OnCreateOutputStream is the third party event and DecryptStreamNeeded is mine so when OnCreateoutputStream fires it calls DecryptStreamNeeded.
In C++ the declaration above works.

I want to recreate that in C#
Here is the Third party delegate and event

event TSBPGPCreateOutputStreamEvent OnCreateOutputStream;
public delegate void TSBPGPCreateOutputStreamEvent(TObject Sender, MemoryStream Stream);

Here is mine:
//Delegates
public delegate void MyDelegateDecrypt(same params as above);
public event MyDelegateDecrypt MyDecryptEvent;

Here is my function i want to call

public void MyDelegateDecryptEvent(same params as above)
{
Stream = myDecryptStream;
FreeOnExit = false;
}

And now I'm stuck because at this point when myDecryptor.OnCreateOutputStream fires I want it to be redirected to MyDecryptEvent. So when I did this:
myDecryptor.OnCreateOutputStream = MyDecryptEvent;

and I get a type mismatch.

Willowsword

-- modified at 11:45 Saturday 6th May, 2006
AnswerRe: Delegates and Events Pin
Robert Rohde5-May-06 20:35
Robert Rohde5-May-06 20:35 
GeneralRe: Delegates and Events Pin
Willowsword6-May-06 5:59
Willowsword6-May-06 5:59 
QuestionHow can I use Javascript to dispatch the methods in BHO components? Pin
dreadknightll5-May-06 12:16
dreadknightll5-May-06 12:16 
QuestionRe: How can I use Javascript to dispatch the methods in BHO components? Pin
leppie5-May-06 12:29
leppie5-May-06 12:29 
AnswerRe: How can I use Javascript to dispatch the methods in BHO components? Pin
dreadknightll5-May-06 21:37
dreadknightll5-May-06 21:37 
GeneralRe: How can I use Javascript to dispatch the methods in BHO components? Pin
leppie5-May-06 21:48
leppie5-May-06 21:48 
Questiondisplaying images in placeholder from databse Pin
kiritc5-May-06 11:20
kiritc5-May-06 11:20 
QuestionGrammer Checker Pin
mehrdadc485-May-06 11:16
mehrdadc485-May-06 11:16 
Question.net obfuscators Pin
thrakazog5-May-06 11:14
thrakazog5-May-06 11:14 
AnswerRe: .net obfuscators Pin
led mike5-May-06 16:22
led mike5-May-06 16:22 
GeneralRe: .net obfuscators Pin
Robert Rohde5-May-06 20:37
Robert Rohde5-May-06 20:37 
QuestionRichTextBox - AutoWordSelection??? no effect Pin
Phil C5-May-06 10:00
Phil C5-May-06 10:00 
AnswerRe: RichTextBox - AutoWordSelection??? no effect Pin
leppie5-May-06 12:33
leppie5-May-06 12:33 
GeneralRe: RichTextBox - AutoWordSelection??? no effect Pin
Phil C5-May-06 13:07
Phil C5-May-06 13:07 
GeneralRe: RichTextBox - AutoWordSelection??? no effect Pin
leppie5-May-06 21:15
leppie5-May-06 21:15 
GeneralRe: RichTextBox - AutoWordSelection??? no effect Pin
Phil C6-May-06 5:19
Phil C6-May-06 5:19 
QuestionHaw can I use a function in .ascx file in asp 2.0 Pin
BogdanCotoc5-May-06 9:45
BogdanCotoc5-May-06 9:45 

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.