le tan duc


use API(), I want to build a function MESSAGEBOX() (as Messagebox() in VFP) (with it i don't want to fix my programs)
(messagbox() i have build have parameters similar to Messagebox fuxnction in VFP)
Thanks







Re: Help me: build messagebox()

le tan duc

but I don't want repaire all my programes( it likes Messagebox() of VFP )







Re: Help me: build messagebox()

Naomi Nosonovsky

Your question is unclear then. What exactly do you want to achieve

For instance, I have my own class which I call frmStatistics and I placed it in UniversalThread website Downloads section. I use this class if I need to show long message in non-proportional font and also my form allows printing the content.

There are several other replacements for the native messagebox function, such as Dragan Nedeljkovich Alert program, for example.





Re: Help me: build messagebox()

dni

You can not implement a new messagebox() function without modify ("repair") old programs. If you still look to do so I think you may need to change vfp code....to replace built in messagebox()....






Re: Help me: build messagebox()

CetinBasoz

You can define messagebox as your function. ie:

#define messagebox myMessageBox

messagebox("This would be my function",0,"my title")

function myMessageBox

lparameters tcMessage,tnButtonType,tcTitle,tnTimeOutInMilliSeconds

if !empty(m.tnTimeOutInMilliSeconds)

wait window m.tcMessage timeout m.tnTimeOutInMilliSeconds/1000

else

wait window m.tcMessage

endif

However find&replace using code references is a better way IMHO.





Re: Help me: build messagebox()

le tan duc

I think,someone can define messagebox() function without modify old programs.
Help me.







Re: Help me: build messagebox()

Naomi Nosonovsky

Your question is still unclear. You don't like the native VFP messagebox function, correct

Or what exactly is the problem





Re: Help me: build messagebox()

Tamar E. Granor

His problem is that he has already used MESSAGEBOX(). Now he wants to replace it without having to modify his existing code.

#DEFINE is a solution, but a bad one. The right answer is to change the code. With Code References, it's not that hard.

Tamar




Re: Help me: build messagebox()

Naomi Nosonovsky

I agree that replace in the code may be the best approach then.