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
1 check passed
@RobertvanderHulst
RobertvanderHulst deleted the fix/vfp-sysmetric-getsystemmetrics branch August 22, 2026 07:37
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