Επεξεργασία

Κοινή χρήση μέσω


Support.LoadResString Method

Definition

Loads a string from a resource (.res) file.

Overloads

LoadResString(Int32)
Obsolete.

Loads a string from a resource (.res) file.

LoadResString(Int32, CultureInfo)
Obsolete.

Loads a string from a resource (.res) file, specifying a locale.

LoadResString(Int32)

Caution

Microsoft.VisualBasic.Compatibility.* classes are obsolete and supported within 32 bit processes only. http://go.microsoft.com/fwlink/?linkid=160862

Loads a string from a resource (.res) file.

public:
 static System::String ^ LoadResString(int ID);
public static string LoadResString (int ID);
[System.Obsolete("Microsoft.VisualBasic.Compatibility.* classes are obsolete and supported within 32 bit processes only. http://go.microsoft.com/fwlink/?linkid=160862")]
public static string LoadResString (int ID);
static member LoadResString : int -> string
[<System.Obsolete("Microsoft.VisualBasic.Compatibility.* classes are obsolete and supported within 32 bit processes only. http://go.microsoft.com/fwlink/?linkid=160862")>]
static member LoadResString : int -> string
Public Function LoadResString (ID As Integer) As String

Parameters

ID
Int32

An Object that specifies the data in the resource file.

Returns

A String that contains the resource.

Attributes

Remarks

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. At run time, locale-specific resources were loaded from the resource file by calling the LoadResString, LoadResPicture, and LoadResData functions.

In Visual Basic, international versions of an application are created by changing the Language property of a form at design time. 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. For more information, see Globalizing Windows Forms applications.

Note

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. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation.

See also

Applies to

LoadResString(Int32, CultureInfo)

Caution

Microsoft.VisualBasic.Compatibility.* classes are obsolete and supported within 32 bit processes only. http://go.microsoft.com/fwlink/?linkid=160862

Loads a string from a resource (.res) file, specifying a locale.

public:
 static System::String ^ LoadResString(int ID, System::Globalization::CultureInfo ^ Culture);
public static string LoadResString (int ID, 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 string LoadResString (int ID, System.Globalization.CultureInfo Culture);
static member LoadResString : int * System.Globalization.CultureInfo -> string
[<System.Obsolete("Microsoft.VisualBasic.Compatibility.* classes are obsolete and supported within 32 bit processes only. http://go.microsoft.com/fwlink/?linkid=160862")>]
static member LoadResString : int * System.Globalization.CultureInfo -> string
Public Function LoadResString (ID As Integer, Culture As CultureInfo) As String

Parameters

ID
Int32

An Object that specifies the data in the resource file.

Culture
CultureInfo

A CultureInfo object that specifies the locale.

Returns

A String that contains the resource.

Attributes

Remarks

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. At run time, locale-specific resources were loaded from the resource file by calling the LoadResString, LoadResPicture, and LoadResData functions.

In Visual Basic, international versions of an application are created by changing the Language property of a form at design time. 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. For more information, see Globalizing Windows Forms applications.

Note

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. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation.

See also

Applies to