How to use LoadResData in VB .Net

If you need badly to use LoadResData in .Net VB you will have to use the VisualBasic.Compatibility namespace. This also applies to otherΒ VB6 functions that areΒ notΒ supported in .Net VB any more.

First of all right clickΒ onΒ your project in the solution explorer pane. Choose add reference and in the tab named .NET choose the ‘Microsoft Visual Basic .Net Compatibility’ and press select button. Then press ok.

Now write Microsoft.VisualBasic.Compatibility.VB6.LoadResData (…) and do whatever you want. If you don’t want to constantly write all the above extremely long line you can go to your project’s properties, select Common Properties->imports on the left window and add the namespace Microsoft.VisualBasic.Compatibility.VB6 into your project. After that you can directly write LoadResData(…)