Declare Long GlobalAlloc In kernel32 Long wFlags, Long dwBytes Declare Long GlobalFree In kernel32 Long hMem Declare Long GlobalLock In kernel32 Long hMem Declare Long GlobalUnlock In kernel32 Long hMem Declare Long lstrcpy In kernel32 Long lpDest, String @lpSrc Declare Long MessageBoxIndirect in Win32API String lpMsgBoxParams Local MsgBoxParams, cText, cCaption, hText, hCaption, pText, pCaption *!* typedef struct { *!* UINT cbSize; 4 bytes *!* HWND hwndOwner; 4 bytes *!* HINSTANCE hInstance; 4 bytes *!* LPCTSTR lpszText; 4 bytes *!* LPCTSTR lpszCaption; 4 bytes *!* DWORD dwStyle; 4 bytes *!* LPCTSTR lpszIcon; 4 bytes *!* DWORD_PTR dwContextHelpId; 4 bytes *!* MSGBOXCALLBACK lpfnMsgBoxCallback; 4 bytes *!* DWORD dwLanguageId; 4 bytes *!* } MSGBOXPARAMS, *PMSGBOXPARAMS; 40 bytes total cText = "Nothing difficult, isn't it?" + Chr(0) cCaption = "MessageBoxIndirect from VFP" + Chr(0) hText = GlobalAlloc(0, Len(cText)) hCaption = GlobalAlloc(0, Len(cCaption)) pText = GlobalLock(hText) pCaption = GlobalLock(hCaption) lstrcpy(pText, cText) lstrcpy(pCaption, cCaption) MsgBoxParams = DWORD(40) + Replicate(Chr(0), 8) MsgBoxParams = MsgBoxParams + DWORD(pText) MsgBoxParams = MsgBoxParams + DWORD(pCaption) MsgBoxParams = MsgBoxParams + DWORD(32 + 4) MsgBoxParams = MsgBoxParams + Replicate(Chr(0), 16) ? MessageBoxIndirect(MsgBoxParams) GlobalFree(hText) GlobalFree(hCaption) Function DWORD(lnValue) Local byte(4) If lnValue < 0 lnValue = lnValue + 4294967296 EndIf byte(1) = lnValue % 256 byte(2) = BitRShift(lnValue, 8) % 256 byte(3) = BitRShift(lnValue, 16) % 256 byte(4) = BitRShift(lnValue, 24) % 256 Return Chr(byte(1))+Chr(byte(2))+Chr(byte(3))+Chr(byte(4))HTH,