Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cesar Chalom's messageboxex
Message
De
08/03/2021 11:07:46
Mike Yearwood
Toronto, Ontario, Canada
 
 
À
07/03/2021 05:54:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
01678706
Message ID:
01678785
Vues:
114
I wish more people were like you. Your advice is offered like I used to offer, without expecting to be insulted.

We are trying to upgrade this app to vfp9. My goal is to automate certain processes, but vfp6 is making that difficult. I may not be able to use FoxyDialog until/if we upgrade. I could fire off a timer based object and have it keyboard, but the timing could be tricky.

Thanks




>>>>Hi All
>>>>
>>>>Where can this be found these days?
>>>
>>>Mike,
>>>
>>>If you're talking about the FoxyDialog, I believe the "official" place to look for it is at Cesar's blog: http://vfpimaging.blogspot.com/2020/06/foxydialogs-v10-going-much-forward-with.html
>>>
>>>The source code for the current 2.4 version is located at the bottom of the post.
>>
>>Thanks. It isn't what I'm looking for. What I am really trying to do is detect that a VFP messagebox has opened. I'm trying to move this to vfp9.
>
>Mike, if you're still interested in this, Cesar's FoxyDialog uses an extended message box class to render the new styles of dialog boxes, with added features.
>
>But it can also be prepared to completely emulate the behavior of the MESSAGEBOX(), including parameters and returned values. So maybe there is a possibility for you to use FD to address your requirements.
>
>Code for a NEWMESSAGEBOX() (being FoxyDialog in scope, of course - I'm using this because FD builds DPI-aware message boxes, unlike the regular VFP MESSAGEBOX() that is rendered blurred even in DPI-aware applications):
>
>
>LPARAMETERS MessageText AS Expression, DialogType AS Integer, ;
>    TitleBarText AS String, Timeout AS Integer
>
>LOCAL DT AS Integer
>
>m.DT = BITAND(EVL(m.DialogType, 0), 0x070)
>
>DO CASE
>CASE m.DT = 64
>	m.DT = -3				&& information
>CASE m.DT = 48
>	m.DT = -1				&& warning
>CASE m.DT = 32
>	m.DT = 0x00007f02		&& question
>CASE m.DT = 16
>	m.DT = -2				&& error
>OTHERWISE
>	m.DT = 0					&& no icon
>ENDCASE
>
>LOCAL BTN AS Integer
>LOCAL BTNCaption AS String
>
>m.BTN = BITAND(EVL(m.DialogType, 0), 0x07)
>
>DO CASE
>CASE m.BTN = 1
>	m.BTNCaption = "Ok,Cancel"
>CASE m.BTN = 2
>	m.BTNCaption = "Abort,Retry,Ignore"
>CASE m.BTN = 3
>	m.BTNCaption = "Yes,No,Cancel"
>CASE m.BTN = 4
>	m.BTNCaption = "Yes,No"
>CASE m.BTN = 5
>	m.BTNCaption = "Retry,Cancel"
>OTHERWISE
>	m.BTN = 0
>	m.BTNCaption = "Ok"
>ENDCASE
>
>LOCAL DefaultBTN AS Integer
>
>m.DefaultBTN = BITAND(EVL(m.DialogType, 0), 0x0300)
>
>DO CASE
>CASE m.DefaultBTN = 256
>	m.DefaultBTN = 2
>CASE m.DefaultBTN = 512
>	m.DefaultBTN = 3
>OTHERWISE
>	m.DefaultBTN = 1
>ENDCASE
>
>LOCAL Reply AS Integer
>
>m.Reply = FoxyDialog(EVL(m.TitleBarText, ""), "", ;
>    TRANSFORM(m.MessageText), m.DT, m.BTNCaption, m.DefaultBTN, EVL(m.Timeout, 0))
>
>DO CASE
>CASE m.Reply < 0
>	RETURN m.Reply
>CASE INLIST(m.BTN, 0, 1)
>	RETURN m.Reply
>CASE m.BTN = 2
>	RETURN m.Reply + 2
>CASE m.BTN = 3
>	RETURN IIF(m.Reply = 3, 2, m.Reply + 5)
>CASE m.BTN = 4
>	RETURN m.Reply + 5
>CASE m.BTN = 5
>	RETURN IIF(m.Reply = 1, 4, 2)
>ENDCASE
>
>
>Then, as Lutz suggested,
>
>
>#DEFINE MESSAGEBOX NEWMESSAGEBOX
>
>
>or make a global replace in your project.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform