Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Distributing COM Object for others to use
Message
 
 
To
10/07/2001 10:54:10
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00528617
Message ID:
00528653
Views:
22
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform