Hi Stefan,
Indeed, it should show identical in VO and X#. Can you please create and post a small (compilable) sample demonstrating this different behavior so we can test with it?
Dialog size behaviour: VO dialog appears narrower (only width!) in X#
Dialog size behaviour: VO dialog appears narrower (only width!) in X#
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Dialog size behaviour: VO dialog appears narrower (only width!) in X#
Stefan,
Perhaps there is an influence from the .NET framework itself. There are known features that result in slight visual differences when displaying Win32 windows from native Win32 applications (like VO) and from a .NET application.
More info here:
https://stackoverflow.com/questions/147 ... -5-net-4-0
Perhaps there is an influence from the .NET framework itself. There are known features that result in slight visual differences when displaying Win32 windows from native Win32 applications (like VO) and from a .NET application.
More info here:
https://stackoverflow.com/questions/147 ... -5-net-4-0
Best regards,
Leonid
Leonid
-
- Posts: 71
- Joined: Thu Jul 15, 2021 10:46 am
- Location: Germany
Dialog size behaviour: VO dialog appears narrower (only width!) in X#
Hi Chris,
here is a simple example. The following code is exactly the same in VO and XSharp:
here is a simple example. The following code is exactly the same in VO and XSharp:
MyDialogWindow_vo is a newly created DIALOGWINDOW via the window entity editors in VO/X# (all defaults, no modifications). The call of DialogWindowTest on the same machine, same resolution, same time, produces different windows (the X# version resulting a bit too narrow for the control):FUNCTION DialogWindowTest AS VOID
LOCAL oDlg AS MyDialogWindow
LOCAL oOwner AS OBJECT
oOwner := GetObjectByHandle(GetActiveWindow())
DO WHILE IsAccess( oOwner, #Owner )
oOwner := oOwner:Owner
ENDDO
oDlg := MyDialogWindow{}
oDlg:Size := dimension{ 300, 300 }
oDlg:Show( SHOWCENTERED )
RETURN
CLASS MyDialogWindow INHERIT myDialogWindow_vo
METHOD _Setup() AS VOID
LOCAL oPsh AS pushButton
LOCAL nX := 10 AS INT
LOCAL nW := 200 AS INT
oPsh := pushButton{ SELF, -1, point{nX,150}, dimension{ nW,20 },"OK" }
oPsh:Show()
SELF:Size := dimension{ nX + oPsh:size:width + nX , SELF:Size:height }
SELF:Caption := "myDialogWindow XSharp "+ntrim(SELF:size:width)+" x "+ntrim(SELF:size:height)
RETURN
METHOD Show( kMode )
SELF:_Setup()
SUPER:Show( kMode )
RETURN SELF
END CLASS
Dialog size behaviour: VO dialog appears narrower (only width!) in X#
Hi Stefan,
try
/subsystemversion:5.00
in "extra command line options"
(Eigenschaften / Build)
Karl
try
/subsystemversion:5.00
in "extra command line options"
(Eigenschaften / Build)
Karl
-
- Posts: 71
- Joined: Thu Jul 15, 2021 10:46 am
- Location: Germany
Dialog size behaviour: VO dialog appears narrower (only width!) in X#
Hi Karl,
perfect: that does the trick!
Now the behaviour is 1:1 to VO. But what kind of magic is this?
perfect: that does the trick!
Now the behaviour is 1:1 to VO. But what kind of magic is this?
Dialog size behaviour: VO dialog appears narrower (only width!) in X#
I have this "kind of magic" from Robert. He should be able to explain it.
It also suppresses these ugly thick frames around datawindows...
It also suppresses these ugly thick frames around datawindows...
Dialog size behaviour: VO dialog appears narrower (only width!) in X#
Hi Karl,
with "ugly thick frames around datawindows" do you mean these XP style frames? They are present also in VO applications, unfortunately.
Using XIDE this does do not seem to change anything....
Wolfgang
with "ugly thick frames around datawindows" do you mean these XP style frames? They are present also in VO applications, unfortunately.
Using XIDE this does do not seem to change anything....
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Dialog size behaviour: VO dialog appears narrower (only width!) in X#
Hello Wolfgang,
I also worried about this issue. But judging by this thread, it's a problem in Windows itself (except Windows Server 2012) and it still hasn't been fixed:
https://github.com/dotnet/winforms/issues/3691
And something tells me that, unfortunately, will never be fixed.
I also worried about this issue. But judging by this thread, it's a problem in Windows itself (except Windows Server 2012) and it still hasn't been fixed:
https://github.com/dotnet/winforms/issues/3691
And something tells me that, unfortunately, will never be fixed.
Best regards,
Leonid
Leonid
Dialog size behaviour: VO dialog appears narrower (only width!) in X#
Hi Wolfgang,
screenshot 1 without /subsystemversion, screenshot 2 with smaller frames...
screenshot 1 without /subsystemversion, screenshot 2 with smaller frames...
Dialog size behaviour: VO dialog appears narrower (only width!) in X#
in VO the datawindows looked like screenshot 2. These "ugly, thick frames" indeed also use space of the canvasarea, so controls don't fit as they did in VO.
IMHO this compiler-switch should be used by default in order to be compatible with VO...
IMHO this compiler-switch should be used by default in order to be compatible with VO...