Posted on

Retrieve resources in c# Windows Forms .Net Application


You have a library (dll) with one or more image and you want to use those image in your application.

Load Resource from application

Consider having a library called : myLibrary.dll with some class inside with Namespace mylibrary.

In your bapplication you can get to the resources by referencing the assembly :

Assembly assem = Assembly.LoadFrom("myLibrary.dll");

You can enumerate the resource files

string[] resNames = assem.GetManifestResourceNames();
if (resNames.Length == 0)
Console.WriteLine(" No resources found.");

foreach (var resName in resNames)
Console.WriteLine(" Resource 1: {0}", resName.Replace(".resources", ""));
foreach (var resName in resNames)
Console.WriteLine(" Resource 2: {0}", resName);

And this will be the output :

Resource 1: myLibrary.Properties.Resources
Resource 2: myLibrary.Properties.Resources.resources

The replace is necessary because the real resource name is the first one (without .resources)

Now, If you have an image called myBitmap.png in your resources, you can load it, using ResourceManager

ResourceManager rm = new ResourceManager("myLibrary.Properties.Resources",

and finally

Object myres = rm.GetObject(myBitmap);

Load Resource inside Library

To get resource from a class inside your resource library, defined a new class, for example myClass and reference own assembly :

rm = new ResourceManager("myLibrary.Properties.Resources",

At this point you can withdraw the resource as seen above.

Posted on

Nakivo request support

The Nakivo backup software license allows you to use Nakivo technicians to resolve any problems. To contact the technicians, in the left menu click on “Help” and then on “Request support”. A new screen will open where you will have to push “Create new bundle”. A new form opens for generating the bundle that will be sent to Nakivo. In the Nakivo software there is the possibility of setting the various tasks or devices to record a verbose log. This may be useful to Nakivo technicians to help you solve your problem.

Job Verbose Log

To enable verbose logging in a job, in the “Options” section you must select “Bottleneck detection”.

Transporter Verbose Log

To enable verbose logging in the transporters (Source and Target) used in a job, select the individual transporter and select “Enable debug logging for this node”.