Home Forums Software Development Display scaling with new coresdk

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #7036
    Anonymous
    Inactive

    Hi I have an application that was built on an old Tobii windows forms example application which was using the old EyeX framework. I recently tried to update it to the new core SDK. However, now I notice that the point on the screen appears to be offset the more I look to the lower right-hand corner. Based on previous post in the forum, it seems this is due to the display scaling issue. My DPI is set to 125% and I wish to keep it there.

    Is it possible that the old SDK adjusted for display scaling and the new SDK does not? Specifically, I’m guessing adjustments might be in the old forms host. Is there anyway you can add support for display scaling in the new SDK, or do I have to account for it manually now?

    #7037
    Anonymous
    Inactive

    I think I found a solution. Since FormsEyeXHost is deprecated, and this object called SetProcessDpiAware(), we have to find another way to call it. Even though I’m running a Windows forms application, I called InitializeWpfAgent hoping it would call SetProcessDpiAware. It appears that it does and it works.

    To fix the problem, just add this to your code:
    _eyeXHost.InitializeWpfAgent();

    #7047
    Grant [Tobii]
    Keymaster

    Hi @phylaxer, great thanks for the tip and glad you managed to find a solution for your needs.

    #7059
    Alex [Tobii]
    Participant

    Hi!

    Why don’t you just call SetProcessDpiAware() yourself?

    #7068
    Anonymous
    Inactive

    @alex I was guessing that that was the function being called. I’m not actually sure what happens inside the FormsEyeXHost or InitializeWpfAgent() call since it’s not open source. I didn’t want to miss something important and preferred an easy and official way to do it.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.