Click here to Skip to main content
15,889,216 members
Home / Discussions / C#
   

C#

 
AnswerRe: Few focused questions Pin
Stefan Troschuetz8-May-06 10:58
Stefan Troschuetz8-May-06 10:58 
AnswerRe: Few focused questions Pin
DigitalKing8-May-06 17:46
DigitalKing8-May-06 17:46 
GeneralRe: Few focused questions Pin
NaNg152419-May-06 0:52
NaNg152419-May-06 0:52 
QuestionRe: Few focused questions Pin
NaNg152419-May-06 1:54
NaNg152419-May-06 1:54 
AnswerRe: Few focused questions Pin
DigitalKing9-May-06 19:47
DigitalKing9-May-06 19:47 
QuestionFew focused questions Pin
NaNg152418-May-06 9:36
NaNg152418-May-06 9:36 
QuestionWalking an XSL to get node/attribute data Pin
LongRange.Shooter8-May-06 9:05
LongRange.Shooter8-May-06 9:05 
QuestionAsyncCallback Pin
yongwpi8-May-06 8:54
yongwpi8-May-06 8:54 
I am using Asyncallback in .net CF development in a button_click event. There is no problem when I complie and deploy the program, but as I click the button to start the event, error occured. The message is 'An unhandled exception of type 'System.NotSupportedException' occurred in System.Windows.Forms.dll', and it stopped at 'application.run(new form())' I used the begininvoke to start the callback, and endinvoke to get the result. I used ppc 2003 emulator, and vs2005. Thanks for your help.

Here comes part of my code:

private delegate int CalcDelegate(int input1, int input2, ref string strResult);

CalcDelegate mDeleg;
private void button1_Click(object sender, System.EventArgs e)
{
mDeleg = new CalcDelegate(Calc);

int input1 = Convert.ToInt16(textBox1.Text);
int input2 = Convert.ToInt16(textBox2.Text);
string strResult = null; // dummy parameter
AsyncCallback cb = new AsyncCallback(CalcCallback);
IAsyncResult ar = mDeleg.BeginInvoke(input1, input2, ref strResult, cb, null);
Thread.Sleep(1000);
}

private void CalcCallback(IAsyncResult ar)
{
string result=null;
int output = mDeleg.EndInvoke(ref result, ar);
textBox3.Text = output.ToString();
}

QuestionRichTextBox throws tab in there Pin
likefood8-May-06 8:25
likefood8-May-06 8:25 
AnswerRe: RichTextBox throws tab in there Pin
LongRange.Shooter8-May-06 9:09
LongRange.Shooter8-May-06 9:09 
GeneralRe: RichTextBox throws tab in there Pin
likefood8-May-06 9:23
likefood8-May-06 9:23 
GeneralRe: RichTextBox throws tab in there Pin
likefood8-May-06 9:28
likefood8-May-06 9:28 
AnswerRe: RichTextBox throws tab in there Pin
likefood8-May-06 10:01
likefood8-May-06 10:01 
GeneralRe: RichTextBox throws tab in there Pin
Office Lineman8-May-06 12:32
Office Lineman8-May-06 12:32 
GeneralRe: RichTextBox throws tab in there Pin
likefood9-May-06 7:27
likefood9-May-06 7:27 
Questionspeech sdk5.1 Pin
TheEagle8-May-06 8:09
TheEagle8-May-06 8:09 
Question2 clicks to activate form menu Pin
Ravi Bhavnani8-May-06 8:09
professionalRavi Bhavnani8-May-06 8:09 
Questionwhy the DataGridViewComboBoxColumn values are lost?!!! Pin
Elvia Gonzalez8-May-06 7:56
Elvia Gonzalez8-May-06 7:56 
QuestionShow and hide buttons Pin
Zspada158-May-06 7:26
Zspada158-May-06 7:26 
AnswerRe: Show and hide buttons Pin
led mike8-May-06 7:52
led mike8-May-06 7:52 
AnswerRe: Show and hide buttons Pin
Stefan Troschuetz8-May-06 7:53
Stefan Troschuetz8-May-06 7:53 
QuestionAttach to Process, how to do in C#? Pin
kumar.bs8-May-06 7:24
kumar.bs8-May-06 7:24 
AnswerRe: Attach to Process, how to do in C#? Pin
Douglas Troy8-May-06 8:50
Douglas Troy8-May-06 8:50 
QuestionClear a WebBrowser's History???? Pin
FoxholeWilly8-May-06 7:22
FoxholeWilly8-May-06 7:22 
AnswerRe: Clear a WebBrowser's History???? Pin
led mike8-May-06 7:51
led mike8-May-06 7:51 

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.