Support.LoadResData 方法
定义
重载
| LoadResData(Object, Object) |
已过时。
从资源 (.res) 文件加载具有多种可能类型的数据。Loads data of several possible types from a resource (.res) file. |
| LoadResData(Object, Object, CultureInfo) |
已过时。
从资源 (.res) 文件加载具有多种可能类型的数据,并指定一个区域设置。Loads data of several possible types from a resource (.res) file, specifying a locale. |
LoadResData(Object, Object)
注意
Microsoft.VisualBasic.Compatibility.* classes are obsolete and supported within 32 bit processes only. http://go.microsoft.com/fwlink/?linkid=160862
从资源 (.res) 文件加载具有多种可能类型的数据。Loads data of several possible types from a resource (.res) file.
public:
static System::Object ^ LoadResData(System::Object ^ ID, System::Object ^ restype);
public static object LoadResData (object ID, object restype);
[System.Obsolete("Microsoft.VisualBasic.Compatibility.* classes are obsolete and supported within 32 bit processes only. http://go.microsoft.com/fwlink/?linkid=160862")]
public static object LoadResData (object ID, object restype);
static member LoadResData : obj * obj -> obj
[<System.Obsolete("Microsoft.VisualBasic.Compatibility.* classes are obsolete and supported within 32 bit processes only. http://go.microsoft.com/fwlink/?linkid=160862")>]
static member LoadResData : obj * obj -> obj
Public Function LoadResData (ID As Object, restype As Object) As Object
参数
返回
一个包含资源的 Object。An Object that contains the resource.
- 属性
注解
在 Visual Basic 6.0 中,通过将所有可本地化的信息,例如字符串、 放入单独的资源文件 (.res) 为每种语言创建国际版本的应用程序。In Visual Basic 6.0, international versions of an application were created by putting all localizable information, such as strings, into a separate resource file (.res) for each language. 在运行时,特定于区域设置的资源已从文件中加载资源通过调用LoadResString, LoadResPicture,和LoadResData函数。At run time, locale-specific resources were loaded from the resource file by calling the LoadResString, LoadResPicture, and LoadResData functions.
在 Visual Basic 中,国际版本的应用程序通过创建更改Language在设计时窗体的属性。In Visual Basic, international versions of an application are created by changing the Language property of a form at design time. 选择每个区域设置自动创建一个单独的资源文件 (.resx)。A separate resource file (.resx) is automatically created for each locale selected. 不再需要从代码; 显式加载资源资源会自动加载基于用户的区域设置进行设置。You no longer have to explicitly load resources from code; resources are automatically loaded based on the user's locale. 有关详细信息,请参阅全球化 Windows 窗体应用程序。For more information, see Globalizing Windows Forms applications.
备注
Microsoft.VisualBasic.Compatibility.VB6 命名空间中的函数和对象用于工具从 Visual Basic 6.0 升级到 Visual Basic 2008。Functions and objects in the Microsoft.VisualBasic.Compatibility.VB6 namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic 2008. 多数情况下,这些函数和对象可再现 .NET Framework 中其他命名空间的功能。In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. 只有当 Visual Basic 6.0 代码模型与 .NET Framework 实现有显著区别时,才必须使用这些函数和对象。They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation.
适用于
LoadResData(Object, Object, CultureInfo)
注意
Microsoft.VisualBasic.Compatibility.* classes are obsolete and supported within 32 bit processes only. http://go.microsoft.com/fwlink/?linkid=160862
从资源 (.res) 文件加载具有多种可能类型的数据,并指定一个区域设置。Loads data of several possible types from a resource (.res) file, specifying a locale.
public:
static System::Object ^ LoadResData(System::Object ^ ID, System::Object ^ restype, System::Globalization::CultureInfo ^ Culture);
public static object LoadResData (object ID, object restype, System.Globalization.CultureInfo Culture);
[System.Obsolete("Microsoft.VisualBasic.Compatibility.* classes are obsolete and supported within 32 bit processes only. http://go.microsoft.com/fwlink/?linkid=160862")]
public static object LoadResData (object ID, object restype, System.Globalization.CultureInfo Culture);
static member LoadResData : obj * obj * System.Globalization.CultureInfo -> obj
[<System.Obsolete("Microsoft.VisualBasic.Compatibility.* classes are obsolete and supported within 32 bit processes only. http://go.microsoft.com/fwlink/?linkid=160862")>]
static member LoadResData : obj * obj * System.Globalization.CultureInfo -> obj
Public Function LoadResData (ID As Object, restype As Object, Culture As CultureInfo) As Object
参数
- Culture
- CultureInfo
一个用于指定区域设置的 CultureInfo 对象。A CultureInfo object that specifies the locale.
返回
一个包含资源的 Object。An Object that contains the resource.
- 属性
注解
在 Visual Basic 6.0 中,通过将所有可本地化的信息,例如字符串、 放入单独的资源文件 (.res) 为每种语言创建国际版本的应用程序。In Visual Basic 6.0, international versions of an application were created by putting all localizable information, such as strings, into a separate resource file (.res) for each language. 在运行时,特定于区域设置的资源已从文件中加载资源通过调用LoadResString, LoadResPicture,和LoadResData函数。At run time, locale-specific resources were loaded from the resource file by calling the LoadResString, LoadResPicture, and LoadResData functions.
在 Visual Basic 中,国际版本的应用程序通过创建更改Language在设计时窗体的属性。In Visual Basic, international versions of an application are created by changing the Language property of a form at design time. 选择每个区域设置自动创建一个单独的资源文件 (.resx)。A separate resource file (.resx) is automatically created for each locale selected. 不再需要从代码; 显式加载资源资源会自动加载基于用户的区域设置进行设置。You no longer have to explicitly load resources from code; resources are automatically loaded based on the user's locale. 有关详细信息,请参阅全球化 Windows 窗体应用程序。For more information, see Globalizing Windows Forms applications.
备注
Microsoft.VisualBasic.Compatibility.VB6 命名空间中的函数和对象用于工具从 Visual Basic 6.0 升级到 Visual Basic 2008。Functions and objects in the Microsoft.VisualBasic.Compatibility.VB6 namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic 2008. 多数情况下,这些函数和对象可再现 .NET Framework 中其他命名空间的功能。In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. 只有当 Visual Basic 6.0 代码模型与 .NET Framework 实现有显著区别时,才必须使用这些函数和对象。They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation.