Skip to content

How to control a windows application using another applicati

neethu sivadas

Asked Feb 7, 2016, 10:51 PM EST1 answer
Share
LinkedInX
My Question :how to control a windows application using another windows application c#.
 
And I used Spy++ to get control ids and now i can handle button events from another windows application.
But I don't know how to handle other tools like menu, combo box  etc..

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    [HttpPost]
    public ActionResult Login(MST_Users login)
    {
    string UserName = login.UserName;
    string Password = login.Password;

    var client = new HttpClient();
    var response = client.PostAsJsonAsync("http://localhost:1724/api/LoginAPI", login).Result;



    if (response.IsSuccessStatusCode)
    {
    var content = response.Content.ReadAsStringAsync().Result;
    var MySessionVal = JObject.Parse(content).Descendants().ToArray();
    SessionManager.UserID = Convert.ToInt32(((Newtonsoft.Json.Linq.JValue)(MySessionVal[5])).Value);
    SessionManager.UserTypeID = Convert.ToInt32(((Newtonsoft.Json.Linq.JValue)(MySessionVal[7])).Value);
    SessionManager.UserName =Convert.ToString((Newtonsoft.Json.Linq.JValue)(MySessionVal[8]).First);

    return RedirectToAction("Index", "Home");
    }
    else
    {
    ViewBag.Message = "Wrong Username or Password";
    return RedirectToAction("Login", "Logins");
    }


    }
    0