>Hi
>
>I have built up a library of various functions that I am putting out for distribution to other developers in my department.
>
>The question is, what do I need to distribute?
>
>Do I just need the DLL's?
>
>Also, I have some MESSAGEBOX() commands in the functions, will these work OK?
>
>THanks
>Kev
Kev,
As Craig said VFP doesn't normally allow UI from within a DLL. However the MessageBox function can be bypassed using the actual WinAPI function and a DLL can execute it generating UI.
function DisplayMessage (cMessageText, nDialogtype, cTitlebartext)
local lcMessagetext, lnDialogtype, lcTitlebartext
declare integer MessageBox in user32 as Msgbox integer, string, string, integer
if vartype(cMessagetext) <> "C" then
lcMessagetext = space(0)
else
lcMessagetext = cMessageText
endif
if vartype(nDialogtype) $ "YNIB" then
lnDialogtype = 0
else
lnDialogtype = nDialogtype
endif
if vartype(cTitlebartext) <> "C" then
lcTitlebartext = space(0)
else
lcTitlebartext = cTitlebartext
endif
return Msgbox(0,lcMessageText,lcTitlebartext,lnDialogtype)
endfunc
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao