question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Win 10 scalling issue

See original GitHub issue

I used VASE app on win 10 ver 1803. It works fine, until I customized win 10 display setting to use a 125% or a 150% scale, when I noticed that subtitle text displayed on the video is shifted down so a part of it goes out of display. This doesn’t happen in Win 7 nor win 10 ver 17xx. Note: VASE Uses Framework V: 4 . I had a performance issue with V 7.2 put this not our concern here!

What has changed, and how this can be solved in .NET? Or should this be solved in Win 10?

Note: This is the class that displays the subtitle text and measures its size: https://github.com/MohammadHamdyGhanem/VASE/blob/master/src/Controls/TransparentRTFViewer.cs

and this is the class that control its pos on the vedio: https://github.com/MohammadHamdyGhanem/VASE/blob/master/src/Controls/VideoPlayerContainer.cs This is the part that does it:

void ResizeSubtitleTextBox(object sender, EventArgs e)
{
    if (ExitResizeTextBox || VideoWidth == 0)
        return;

    var _subtitlesHeight = _subtitleTextBox.Height;
    if (_subtitlesHeight == 0 || _panelcontrols == null)
        return;

    var p = PointToScreen(this.Location);
    _formSubtitle.Left = p.X + 2;

    float VideoHeight2 = (VideoHeight < VideoWidth) ? VideoHeight * Width / VideoWidth : Height;

    var h1 =  Height - (_subtitlesHeight + (_panelcontrols.Visible ? _controlsHeight : 0));
    var h2 =  PanelPlayer.Top + (int)((Height + VideoHeight2) / 2);
    _formSubtitle.Top = p.Y + Math.Min(h1, h2);
     _formSubtitle.Width = Width - 4;           
    _subtitleTextBox.Width = Width - 4;

    p = this.PointToScreen(_panelcontrols.Location);
    _formSubtitle.Height = Math.Max(_subtitlesHeight + 1, p.Y - _formSubtitle.Top - 2);
        }

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
lindexicommented, Jan 16, 2019

@lextm Do you mean using dotnet new winforms -o MyWinFormsApp to create a WinForms project and opening it in the VisualStudio 2019

1reaction
ghostcommented, Jan 6, 2019

@lextm : I think this problem exists in .net core too, becuase the changes in win 10. So, any issue we report about .net framework win forms, is to be fixed in .net core version, which we will move to sooner or later. This is expected, becuase up and running apps today use .net framework, so practical issues come from them.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Windows scaling issues for high-DPI devices
To work around scaling issues, try the following methods: ... Change application properties In Explorer or on the Start menu, right-click the application...
Read more >
How to fix display scaling issues on Windows 10
Open Settings on Windows 10. · Click on System. · Click on Display. · Under “Scale and layout,” click the “Advanced scaling settings”...
Read more >
How to Fix Windows Scaling Issues for High DPI Screens
In the Display settings window, scroll down to the Scale & layout section. Then select an appropriate scaling level from the drop-down menu....
Read more >
How to fix Windows Scaling issues for High-DPI devices
How to fix Windows Scaling issues for High-DPI devices · Open Settings > Ease of Access · Here, under Display, you can change...
Read more >
How To Fix Display Scaling Issues - TechNewsToday
How to Fix Display Scaling Issues · Match Screen Resolutions · Log Out and Log Back in · Check for Software Updates ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found