Click here to Skip to main content
15,867,330 members
Home / Discussions / C#
   

C#

 
AnswerRe: Set ID and value to a treeview node Pin
Henry Minute7-Oct-09 2:36
Henry Minute7-Oct-09 2:36 
QuestionGet checked child nodes from tree view Pin
yesu prakash7-Oct-09 0:33
yesu prakash7-Oct-09 0:33 
AnswerRe: Get checked child nodes from tree view Pin
stancrm7-Oct-09 0:37
stancrm7-Oct-09 0:37 
Questiondatagrid textbox cell Pin
Member 5903106-Oct-09 23:48
Member 5903106-Oct-09 23:48 
AnswerRe: datagrid textbox cell Pin
Henry Minute7-Oct-09 2:30
Henry Minute7-Oct-09 2:30 
GeneralRe: datagrid textbox cell Pin
Member 5903107-Oct-09 22:32
Member 5903107-Oct-09 22:32 
GeneralRe: datagrid textbox cell Pin
Henry Minute8-Oct-09 4:12
Henry Minute8-Oct-09 4:12 
QuestionAsynchronous methods - callback method is never called Pin
lvq6846-Oct-09 23:47
lvq6846-Oct-09 23:47 
Hi.

I have this console based Asynchronous VS project that works fine.
And then i have a remoting project which also works fine. I want to edit the remoting project so it is non-blocking, using asynchronous calls.

I´ve tried different examples, but I cant get it to work. None of them seems to call my callback method back.

Here is the relevant snippets:

The remote object:

....
public class MultiContainer : MarshalByRefObject, IMultiContainer
    {
        public string GetClientsList()
        {
            Thread.Sleep(1000);
            return Program.ServerForm.GetClientsList();
        }
....



The client which accesses the remote object with asyn call:

namespace Client
{
    public partial class Form1 : Form
    {
        Server.IMultiContainer mc;
        private delegate string Delegate();

        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            mc = new Server.MultiContainer();
            Delegate del = new Delegate(mc.GetClientsList);
            AsyncCallback callback = new AsyncCallback(Callback);
            del.BeginInvoke(callback, null);
        }

        private void Callback(IAsyncResult ar)
        {
            //this callback method is never called...
            Delegate del = (Delegate)((AsyncResult)ar).AsyncDelegate;
            richTextBox1.Text = del.EndInvoke(ar);
        }
...



Been sitting with this problem for hours, hope you can help!
Thanks alot Smile | :)
QuestionHelp Streaming Video Pin
amaankhan6-Oct-09 22:30
amaankhan6-Oct-09 22:30 
Answerwhat ? Pin
Christian Graus6-Oct-09 22:32
protectorChristian Graus6-Oct-09 22:32 
GeneralRe: what ? Pin
amaankhan6-Oct-09 22:37
amaankhan6-Oct-09 22:37 
GeneralRe: what ? Pin
Christian Graus6-Oct-09 23:35
protectorChristian Graus6-Oct-09 23:35 
GeneralRe: what ? Pin
EliottA7-Oct-09 2:08
EliottA7-Oct-09 2:08 
AnswerRe: Help Streaming Video Pin
Saksida Bojan6-Oct-09 22:37
Saksida Bojan6-Oct-09 22:37 
GeneralRe: Help Streaming Video Pin
amaankhan6-Oct-09 22:48
amaankhan6-Oct-09 22:48 
GeneralRe: Help Streaming Video Pin
Saksida Bojan6-Oct-09 22:57
Saksida Bojan6-Oct-09 22:57 
GeneralRe: Help Streaming Video Pin
amaankhan6-Oct-09 23:03
amaankhan6-Oct-09 23:03 
GeneralRe: Help Streaming Video Pin
Christian Graus6-Oct-09 23:36
protectorChristian Graus6-Oct-09 23:36 
GeneralRe: Help Streaming Video Pin
OriginalGriff7-Oct-09 3:01
mveOriginalGriff7-Oct-09 3:01 
QuestionDataBinding between a DataTable and a TextBox Pin
Kit Fisto6-Oct-09 22:29
Kit Fisto6-Oct-09 22:29 
AnswerRe: DataBinding between a DataTable and a TextBox Pin
Henry Minute7-Oct-09 2:45
Henry Minute7-Oct-09 2:45 
AnswerRe: DataBinding between a DataTable and a TextBox [modified] Pin
Kevin Marois7-Oct-09 5:22
professionalKevin Marois7-Oct-09 5:22 
GeneralRe: DataBinding between a DataTable and a TextBox Pin
Kit Fisto9-Oct-09 1:32
Kit Fisto9-Oct-09 1:32 
Questionplease help me : How to call Pl sql function return record type in C# Pin
sampath_dr6-Oct-09 22:16
sampath_dr6-Oct-09 22:16 
AnswerRe: please help me : How to call Pl sql function return record type in C# Pin
Christian Graus6-Oct-09 22:18
protectorChristian Graus6-Oct-09 22:18 

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.