Skip to content

Fix SYSMETRIC() by going through GetSystemMetrics() - #2065

Merged
RobertvanderHulst merged 1 commit into
devfrom
fix/vfp-sysmetric-getsystemmetrics
Aug 22, 2026
Merged

Fix SYSMETRIC() by going through GetSystemMetrics()#2065
RobertvanderHulst merged 1 commit into
devfrom
fix/vfp-sysmetric-getsystemmetrics

Conversation

@Irwin1985

Copy link
Copy Markdown
Contributor

Fixes #1864

I was trying to figure out why some SYSMETRIC() values didn't match VFP and found it in the help: the Remarks say SYSTEMETRIC() is basically GetSystemMetrics(). We weren't calling it. Every element was approximated with a .NET SystemInformation property.

I ran all 34 elements against a real VFP 9 on my machine and 15 came out wrong. Changed the SWITCH to call GetSystemMetrics() with the matching SM_ index, and now 32 of 34 match.

@RobertvanderHulst
RobertvanderHulst merged commit f08b4e3 into dev Aug 22, 2026
@RobertvanderHulst
RobertvanderHulst deleted the fix/vfp-sysmetric-getsystemmetrics branch August 22, 2026 07:37
RobertvanderHulst added a commit that referenced this pull request Sep 1, 2026
…2072)

* [Compiler tests] - Adjusted NetCore runtime folder in automated tests runner. Also temporarily disabled C548 from running, to check if this is the culprit in making other tests fail later

* [Compiler tests]- Indeed C548 was one of the culprits, moved it last in the order of runtime tests. Also updated several XSharp runtime dlls for the tests, hopefully this will take care of the remaining problems in running the tests

* [Compiler tests] All automated tests should be now passing both compiling and runtime tests

* Fix SYSMETRIC() by going through GetSystemMetrics() (#2065)

* [VsIntegration] Fix reference resolution: marshal AddPendingReferences onto the UI thread (#2066)

* Add tests for numeric properties in DEFINE CLASS (#2067)

* Add tests for numeric properties in DEFINE CLASS

* Change to usual for late binding

* [VSIntegration] Add WinForms Designer shadow-file bridge for SDK-style projects

Redirects "View Designer" on a SDK-style .prg to an auto-generated
companion C# project instead of the unsupported out-of-process Designer
path, since it has no extensibility point for third-party languages.
Includes commands to sync Designer-added event handlers and general
property/control changes back into the real X# source.

* [VSIntegration] Update comments and Docs

* [VSIntegration] Fix ViewForm routing, auto-detect HasDesigner and its icon

* [VSIntegration] Add auto-sync-on-save, cleanup-on-close, fix reference throttle race.

* Logging Exception with stacktrace and as arror (#2071)

* [VSIntegration] Nest the shadow companion project in a Solution Folder instead of adding it at the same level as the X# project

* Implement XMLTOCURSOR() (#2070)

* Implement XMLTOCURSOR()

* Move the internal functions into an internal class

* [VSIntegration] Fix event-handler caret positioning. Fix old ShadowDesigner references that may persist. Moved all Diagnostics to X# Logging system.

* Prevent double licking on designer.prg from opening the form designer

* Generate comments in InitializeComponent

* [CodedomProvider] Fix handling of System.Single types

* Fix namespaces which are different between .net framework and .net 8

---------

Co-authored-by: cpyrgas <chris@xsharp.eu>
Co-authored-by: Irwin <rodriguez.irwin@gmail.com>
Co-authored-by: Fabrice Foray <fforay@users.noreply.github.com>
Co-authored-by: Robert van der Hulst <robert@xsharp.eu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants