FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour dialog with CANCEL button
Posts: 434
Joined: Wed Jun 06, 2007 02:58 PM
dialog with CANCEL button
Posted: Mon Jan 15, 2018 11:37 AM

hi to all
I know MsgRun() or MsgMeter() function, but this functions have not CANCEL button to stop codeblock inside.
is there any function or example with dialog that run any function and with CANCEL button to stop that function?
thanks.

FiveWin for xHarbour 24.02 - Feb. 2024 - Embarcadero C++ 7.60 for Win32 Copyright (c) 1993-2023

FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)

Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: dialog with CANCEL button
Posted: Tue Jan 16, 2018 08:27 PM

Well, you can use a non-modal dialog with a Cancel button, but the hard part is how is the codeblock going to determine when the button is pressed?

Perhaps you can use the oDialog:cargo property to hold a flag which defaults to .T. and when the button is pressed, change the flag to .F. and then the codeblock would see the change the next time through the loop (assuming the codeblock is in a loop).

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10

Continue the discussion