Visual Basic Reference
See Also Example Applies To
Loads a string from a resource (.res) file.
The LoadResString function syntax has these parts:
|index||Required. Integer specifying the identifier (ID) of the data in the resource file. The resource whose ID is 1 is reserved for the application icon.|
You can use the LoadResString function instead of string literals in your code. Storing long strings of data in and accessing them from resource files improves load time because you can load them individually as needed from the resource file, rather than all at once when a form is loaded.
Using LoadResString is useful for localizing a Visual Basic application because the resources that need to be translated are isolated in one resource file and there is no need to access the source code or recompile the application.