Declare String CD_GetFile in HTWindow ; String cStartDir, String cStrFilter, Long hWndParent, ; Long nPosition, Long nX, Long nY, ; Long uFlags, Long uFlagsEx, ; String cWndTitle, String cBtnCaptionThe "uFlags" is the standard GetOpenFileName() API flags. While the "uFlagsEx" is the extended one. Use the "uFlagsEx" and pass in HTCDF_NOSELECTDIR in order to prevent the folder selection. If you don't use HTCDF_NOSELECTDIR in the "uFlagsEx" parameter then it behaves as a standard GetOpenFileName with whatever "uFlags" you passed in.