6

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.

Community
  • 1
  • 1
tentmaking
  • 2,076
  • 4
  • 30
  • 53
  • Where is the link to the question you mention? The correct approach would be to post *both* this question (as a question) *and* the answer (since you already know it). That is entirely welcome here! But the answer should be posted as an answer, otherwise others can easily miss it. – Joachim Sauer Aug 23 '12 at 14:58
  • I'm sorry I'm new to Stack Overflow. Though, I should have known better...I will edit the question, with the link. I forgot to paste it in. – tentmaking Aug 23 '12 at 15:08
  • I can't answer my own question for another 7 hours because I have a low reputation. – tentmaking Aug 23 '12 at 15:15

1 Answers1

4

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".

Joachim Sauer
  • 302,674
  • 57
  • 556
  • 614
tentmaking
  • 2,076
  • 4
  • 30
  • 53