Win 10 scalling issue
See original GitHub issueI 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:
- Created 5 years ago
- Reactions:1
- Comments:9 (1 by maintainers)

Top Related StackOverflow Question
@lextm Do you mean using
dotnet new winforms -o MyWinFormsAppto create a WinForms project and opening it in the VisualStudio 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.