Fix: MESSAGEBOX() timeout issue and implement dynamic parameter handling#1897
Merged
Conversation
Member
|
Does this mean that you're no longer using AutoCloseMessagebox? |
Contributor
Author
|
Hi Robert, Yes, we (XSharp.VFP) won't need it anymore. I'll mark it as Obsolete because I'm not sure if it will be neccesary or required by someone else in the future. |
RobertvanderHulst
added a commit
that referenced
this pull request
Apr 6, 2026
* Update CI workflow to use latest action versions * Upgrade upload-artifact action to version 6 * Update GitHub Actions clean workflow to version 7 (#1899) * Fix #1857: Refined SET('DEFAULT') / SET('DIRECTORY') (#1892) * [Compiler tests] Marked fixed tests * [Runtime tests] Adjusted SetDefault tests * [Compiler tests] Added C959 for #836 * [Compiler tests] Added C960 and C961 for #1286 * Fix: FCHSIZE and VFP compatible BINTOC() / CTOBIN() (#1893) * Fix: FCHSIZE and VFP compatible BINTOC() / CTOBIN() * Moved BINTOC, CTOBIN to StringFunctions.prg * [Vsintegration] Fix issue #1802. This was caused by our project system responding wit "true" to the Project Dependency "PackageReferences". I have also moved Logging and Most Event handlers for VS events to a new solution "Support". Both the project system and Language service call the initialization code in this Support DLL to make sure that this is loaded as early as possible. Also fixed an issue in the IDE BuildLogger and updated a few nuget packages * [Compiler tests] Added C962 for #1490 and #1491 * [Compiler tests] Added C963 for #1836 * [Compiler tests] Added C964 for #1860 * Fix: Sysmetric, SET MEMOWIDTH typo and SET DEFAULT / DIRECTORY issues at startup (#1894) * [Runtime] Late bound code should give precedence to NEW method. Fixes #1286 * [Runtime] Late bound code should give precedence to NEW method. Fixes #1286 * [Tests] Fix error in test code. * Fix: Convert MemoHelpers.MAX_WIDTH to dynamic property (#1895) * GET* UI Dialogs implementation (GETDIR, GETFILE, GETPICT) (#1896) * Fix: MESSAGEBOX() timeout issue and implement dynamic parameter handling (#1897) * Fix: MESSAGEBOX() timeout issue and implement dynamic parameter handling * Marked as Obsolete the AutoCloseMessageBox class * Update GitHub Actions clean workflow to version 7 (#1898) * Update CI workflow to use latest action versions * Upgrade upload-artifact action to version 6 * Update GitHub Actions clean workflow to version 7 --------- Co-authored-by: Irwin <rodriguez.irwin@gmail.com> Co-authored-by: cpyrgas <chris@xsharp.eu>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses the issue where the
nTimeOutparameter inMESSAGEBOX()failed to close the dialog reliably (failing 9 out of 10 times).Changes made
FindWindowapproach with the nativeMessageBoxTimeoutWfor atomic and reliable timeouts.MessageBoxsignature to acceptUSUALtypes. This fully supports VFP's dynamic parameter ordering (ej: allowingMESSAGEBOX("Msg", "Title", 64)orMESSAGEBOX("Msg", 64, "Title")).Stopwatchsafety check inVfpUIProvider.prg. If modern Windows versions return a default button ID instead of32000upon timeout, the Stopwatch ensures-1is strictly returned to match VFP specs.Testing
-1consistently.