Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issues with Magnification API

I am having issues with the Magnification API provided my Microsoft. This is an API that is written in C++ so to use it with C# you must use a series of .dll imports as described in this question.

My issue came after I had the magnification working. I was using my mouse to magnify a predefined area of the screen, the magnification was set in a rectangle, the rectangle filled a WinForm, I placed the form on top of my mouse (mouse in center of form), and the form would follow my mouse around the screen.

About 80% of the time, the app will launch with a black screen. I tried many different types of updates but can't find a fix. The magnification will not show up, it will only show a black screen. Nothing on the from will show up, only a black screen. In summary, only a black screen will show up, BECAUSE of the Magnification API.

like image 759
tentmaking Avatar asked Aug 23 '12 14:08

tentmaking


1 Answers

The problem has to deal with Windows 32 and 64 bit systems. There's a Forum post about this problem.

I changed the Build of my project from x86 to Any CPU - fixed the problem, no coding needed.

In Visual Studio 2010: In the Solution Explorer right click your project > choose Properties > choose the Build tab > and under Platform Target choose "Any CPU".

like image 161
tentmaking Avatar answered Oct 10 '22 20:10

tentmaking