Normally the open with dialog appears when u try to open a file and there cant be a programme found to open the file with. (unknown file extension) i been looking for quite some time. but i just found it.
ill post the code below here so more of us can enjoy from it.
-----------------------
LOCAL lnRetval, lcFile, lcOperation
lcFile = "c:\just_for_test.unkown"
lcOperation = "Open"
DECLARE INTEGER ShellExecute IN SHELL32.DLL ;
INTEGER handle,;
STRING @sFile,;
STRING @lp,;
STRING @dir,;
STRING @dir1,;
INTEGER ncmd
lnRetval = ShellExecute(0, lcOperation, lcFile, "", "", 1)
IF lnRetval=31
DECLARE INTEGER GetDesktopWindow IN user32.dll
DECLARE INTEGER GetSystemDirectory IN kernel32.dll ;
STRING @lsBuffer, ;
INTEGER liSize
lsSysDir = SPACE(260) && MAX_PATH, the maximum path length
liRet = GetSystemDirectory(@lsSysDir, LEN(lsSysDir))
lsSysDir = SUBSTR(lsSysDir, 1, liRet)
lsRun = "RUNDLL32.EXE"
lsParameters = "shell32.dll,OpenAs_RunDLL "
liRet = ShellExecute(GetDesktopWindow(), "open", lsRun,;
lsParameters + lCFile, lsSysDir, 1)
ENDIF
------------------
this tries to open the file just_for_test.unknow.
the shellexecute returns a 31 value, that is the return value when there is no programme found to open the file with.