Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Distributing COM Object for others to use
Message
 
 
À
10/07/2001 10:54:10
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00528617
Message ID:
00528653
Vues:
23
>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.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform