Quantcast
Channel: Windows Desktop Development for Accessibility and Automation forum
Viewing all articles
Browse latest Browse all 585

Why InvokeRequired property value differed between VS2012 and VS2013?

$
0
0

I am developing UI automation for my control. The below code working fine in VS2012.

MyControl.PointToClient(p);

But this code not working in VS2013. It was throws an following exception 

Also i have used the below code to Invoke the control

public new Point PointToClient(Point p)
{
   if (MyControl.InvokeRequired)
   {
       pointToClientCallBack ptcb = new pointToClientCallBack(PointToClient);
       GetWindow().Invoke(ptcb, new object[] { p });
   }
   return MyControl.PointToClient(p);
}
delegate Point pointToClientCallBack(Point p);

after i invoked my control, InvokeRequired property is in true.

So, can you please suggest me the right way to solve this problem.

Thanks,

Mohanraj G.


Viewing all articles
Browse latest Browse all 585

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>