Use Windows.Pkg Use cRegistry.Pkg // f_CurrentUserWorkspace.pkg // ------------------------- // Returns the current user's currently selected workspace. The workspace is stored // in the windows registry under HKEY_CURRENT_USER. Function CurrentUserWorkspace Global Returns String Handle hoRegistry String sWorkspace Boolean bOpened bValueExists Get Create U_cRegistry To hoRegistry Get OpenKey of hoRegistry ("SOFTWARE\Data Access Worldwide\Visual DataFlex Tools\" + SysConf (SYSCONF_DATAFLEX_REV) + "\Studio\Workspaces") To bOpened If (bOpened) Begin Get ValueExists Of hoRegistry "Current Workspace" To bValueExists If (bValueExists) Begin Get ReadString of hoRegistry "Current Workspace" To sWorkspace End Send CloseKey Of hoRegistry End Send Destroy Of hoRegistry Function_Return sWorkspace End_Function // CurrentUserWorkspace