Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5973037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:44:36+00:00 2026-05-22T20:44:36+00:00

I am trying to handle events with Visual Studio C# like I did with

  • 0

I am trying to handle events with Visual Studio C# like I did with my Windows Form, so for example:

On my Windows Phone 7 my code looks like this:

//ASDF.CS CLASS  

public delegate void SignedOn(string Screenname);

public event SignedOn SO;

public void dataIncoming(string packet)
{
     switch (packet)
 {
    case 0:
        if (SO != null)
                                    SO(m_Screenname);
        break;
}
}

//MainWindow.xaml.cs

m_A.SignedOn += new ASDF.SignedOn(m_A_LoggedIn);


void m_OSC_LoggedIn(string Screenname, string FormattedSN, string Email)
    {
        //Works all the way to this sub then the code in here don't get ran because there is no invoke with WP7

        MessageBox.Show("hello!");
}

My Windows Form Code that looks like this works:

//ASDF.CS CLASS  

public delegate void SignedOn(string Screenname);

public event SignedOn SO;

public void dataIncoming(string packet)
{
     switch (packet)
 {
    case 0:
        if (SO != null)
                                    SO(m_Screenname);
        break;
}
}

//MainWindow.cs

m_A.SignedOn += new ASDF.SignedOn(m_A_LoggedIn);


void m_OSC_LoggedIn(string Screenname, string FormattedSN, string Email)
    {
         this.Invoke(new MethodInvoker(delegate
        {
            MessageBox.Show("hello!");
    }));
}

So is there anyway I can get an alternative for invoke to work with Windows Phone 7?

Are there any other ways of getting this to work on WP7?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T20:44:37+00:00Added an answer on May 22, 2026 at 8:44 pm

    Try using:

    void m_OSC_LoggedIn(string Screenname, string FormattedSN, string Email)
    {
    
            Dispatcher.BeginInvoke(() =>
            {
                  MessageBox.Show("hello!");
            });
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to handle this possible exploit and wondering what is the best way
I'm trying to debug an ASP.NET web application in this environment: Windows Server Standard
I'm trying to handle events related to clicking on or pressing enter on a
I've got a simple storyboard animation that looks like this: <Window.Resources> <Storyboard x:Key=fader> <DoubleAnimationUsingKeyFrames
I am trying to draw a figure something like this: I need to have
I am trying to handle touch events and click events on a button. I
I am trying to handle some events when my application is idle so i
I'm asking this because I really don't know where I should handle events of
I'm trying to find better methods to handle the events of a polled socket
I'm trying to handle Winsock_Connect event (Actually I need it in Excel macro) using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.