DECLARE INTEGER GetPrivateProfileString IN kernel32; STRING @sAppName,; STRING @sKeyName,; STRING @sDefault,; STRING @sReturn,; INTEGER @nSize,; STRING @sFileName sFileName = LOWER(GETFILE()) sSection = "Application" sKeyName = "Top" sDefault = "(#default#)" && Return "(#default#)" if value is not found iSize = 255 && Size of the string sReturn = SPACE(iSize) && String to contain the returned value lRetVal = GetPrivateProfileString(@sSection, @sKeyName, @sDefault,; @sReturn, @iSize, @sFileName) sReturn = STRTRAN(sReturn, CHR(0), "") MESSAGEBOX(TRANSFORM(lRetVal)) MESSAGEBOX(sReturn) RETURN