Unable to load dsr files in vb6 project - vb6

I am currently trying to open up an old project that I have in my possession. Its written in vb6 and I have attempted to upgrade to a newer version but I get a slew of errors saying I need to have a working vb6 environment with all references in order to upgrade.
I have vb6 itself working and when I open my project file any .dsr, .dsx files will not load with the following error (which prompts me to go to the log file).
Line 2: Class {BD4B4E61-F7B8-11D0-964D-00A0C9273C2A} of control crBooking was not a loaded control class.
Line 0: The file C:\Users\Greg\Desktop\VB6 - Conversion\VBSource\crBooking2.Dsr could not be loaded.
All form files along with class modules and the project file itself load just fine. I have no idea what this means or how to fix it. Any help would be greatly appreciated.

The .dsr files are generated by any so called Designer. Those are extensions which can be added to the VB6 environment.
On example is the Designer which is used by the Visual Basic for Applications IDE extension. This one is used, if you are developing an extension for VB6 or VBA itself.
As already mentioned, the GUID seems to belong to a Crystal Reports component. So it might be necessary to either install a greater version of VB6 (some of them come with a Crystal Reports light) or to install the Crystal Reports software itself.

Related

Problems with FM20.dll and crystl32.ocx while opening VB6 project

A client has recently given me some work involving their (old) VB6 program. I've successfully installed VB6 in a VM with Windows XP (32 bit), and it works just fine. The problem is when I try to open the client's program. The following messages pop up:
crystl32.ocx could not be loaded--Continue Loading Project?
FM20.DLL could not be loaded--Continue Loading Project?
After that there are a bunch of warnings cause of crystl32.ocx.
So I tried to register the dependencies with regsvr32, but it said that the modules couldn't be found, even though they were right there. Googling the problem took me to download Dependency Walker and find which dll files were needed for those files, which were:
msvcr100.dll
IEShims.dll
wer.dll
crpe32.dll
After downloading these dll files, I tried registering the first one, but it said that the "dllregisterserver entry point was not found". So I tried to unregister it first, but it couldn't find the module.
I've reinstalled VB6 several times, to no effect. Any ideas on how to make this work?
Crystl32.ocx and Crpe32.dll are Crystal Reports run time files.
FM20.DLL is Microsoft Form 2.0 Library with some standard GUI controls like label, text box, check box etc.
Msvcr100.dll is a part of
MS Visual C++ 2010 Redistributable Package
If there is an installer of your client's program you should run it before opening the source code with VB6 IDE. That way you’ll get all the dependencies required by VB6 program.
If not, please post the vbp file of your VB6 application.
thanks for all the help! The solution in the end was the installation of the CR 4.6 that the client later provided me with (as #BrianMStafford suggested), of VB6 SP6 and of Office 2007, together with SP3.
With that I've managed to get the project running, so thanks to everyone!!

How to create a managed plugin for Unity with Visual Studio Community for Mac

I'm going to create my first managed plugin for Unity (2018.2) using Visual Studio Community for Mac (7.6.11 build 9).
I've read the documentation but I think that the step-by-step instructions are not meant to be followed on Visual Studio Community for Mac.
As you can see in the screenshot below, I've created several projects using each and every library template available.
All of them compiled successfully to a DLL targeting versions of .NET framework that are incompatible with Unity.
The only project I could change the .NET framework version to match Unity's 3.5 is the one based on the Other > .NET > Library.
Everything works fine but I'd like to know if the assumptions, the process and the final result are correct. Can you tell me, please?
I don't know the difference between the "Class" and the "Class Library" option but you're supposed to use the "Class Library" option. This is not the main point of this answer.
Two future issues you haven't solved yet:
1. Referencing Unity's API.
If you ever have to use any Unity library or API in youir plugin such as Vector3, you need to add Unity's UnityEngine.dll to your library settings. If you don't, you will run-time exceptions.
Go to Project --> Add Reference ---> Browse ---> Browse Button
then select <UnityInstallationDirecory>\Editor\Data\Managed\UnityEngine.dll. You can now build your managed plugin. Since you're using Mac, this path is different on your OS. On Mac, this could be /Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEngine.dll. You just have to find where UnityEngine.dll is located.
2. Invisible stack trace
With your current setup, if you run into error with your managed plugin, the stack trace won't be there. You won't have the file names and line numbers and this makes is very hard to debug your plugin code.
When you build the project, Visual Studio generates a PDB file instead of an MDB file. Unity can't use this directly. You have to convert the PDB files into MDB files.
From command line, run this:
<UnityInstallationDirecory>\Data\MonoBleedingEdge\lib\mono\4.5\pdb2mdb.exe UnmanagedPlugin.dll
Again, the path might be different on Mac, you just need to find "pdb2mdb.exe" that converts the PDB files into MDB files.
After that, copy the MDB and dll file into the "Assets" folder in your Unity project.

vb6 not able to load forms with status bar control on windows 7 64 bit

I am trying to load open vb6 form but it says cannot find project or library and the cursor is pointing to statusbar. This particular line of code:
Private mStatus As StatusBar
I have installed the common controls for vb6 update from Microsoft but it's still not doing the job.
I have also tried this :
not able to open VB project, getting error "C:\windows\system32\mscomctl.ocx" could not be loaded
and
regsvr32 mscomctl.ocx
regsvr32 mscomct2.ocx
regsvr32 comct332.ocx
and closed vb6 down, reopened the project and tried to open the form with the control and it gave me same error message.
The edition is enterprise with sp6 installed.
Any advices to fix the issue will be much appreciated.
Thanks!
I had this problem moving projects from XP 32 bit to Win7 64 bit, and aven after getting VB6 apparently working using the various helpful instructins on this site, every time I tried to load up an existing project it failed on opening the project.
Eventually I fixed it by editing (with Notepad) the reference lines in the .VBP project file, which had C:\WINDOWS\SYSTEM32 hard coded in, to point to C:\Windows\SysWOW64.
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINDOWS\SYSTEM32\STDOLE2.TLB#OLE Automation
Change to
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\Windows\SysWOW64\STDOLE2.TLB#OLE Automation
Project files now open up and compile fine. But presumably I will have a similar difficulty if I try to open modified projects on a 32 bit system again.
Found Solution!
Add MSCOMCTL.OCX in SysWOW64(64-bit) or System32 (32-bit) folder
Project - Component - Click Browse and give path to the above file
Download Microsoft Visual Basic 6.0 Common Controls
and install
No OCX missing errors after that

How to solve this error: Could not find file 'Microsoft.Windows.CommonLanguageRuntime, Version 2.0.50727.0'

This question to which I already found the answer is posted here in case of someone else encounters it. I decided to post the Q&A here so that SO has something about this error, since I don't know if it's been here before.
This occured after an update of the .NET Framework. Before the update, everything compiled just fine! After the update, I could compile nothing!
The error message is:
Error 1 - Could not find file 'Microsoft.Windows.CommonLanguageRuntime, Version=2.0.50727.0'.
This is a problem within Visual Studio 2005. This occurs after an update of the .NET Framework 2.0 and is due to project reference within a single solution.
For example, when you're writing a test library which will test your assembly within the same solution, you will most likely reference the project. Then, this error may occur.
To solve this error, simply reference the file binary of your project, either the DLL or the EXE within which resides the code you want to test. This is called a file reference.
Let's suppose we have two projects called:
Company.Project.ApplicationName;
Company.Project.ApplicationName.Tests.
When adding the reference to our Company.Project.ApplicationName project within our Company.Project.Application.Tests project, we can either use the Browse or the Project tab. When using the Project tab, you create a project reference. We don't want to use this if this error occurs. What we want to use is Browse, so that we can make a file reference.
Here's a link to the Microsoft Support Website that explains this issue.
You may receive a "Could not find file 'Microsoft.Windows.CommonLanguageRuntime" error message when you build a solution of a Visual Basic 2005 Windows Application project in Visual Studio 2005

VS 2008 designer "Could not find type...."

I'm getting this error in visual studio 2008 in a Mobile Desktop application .NET 3.5.
Could not find type 'MyNamespace.MyType'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built.
This shows up when opening a form. The type that it can't reference is a user control that is part of the same project. Nothing is wrong with the namespaces. This is maddening -- the project builds just fine.
Also, the referenced control is not a generic class like in this article: "Could not find type" error loading a form in the Windows Forms Designer
UPDATE: well now later it seems to be working. This seems to be a sporadic problem...
Is the actual line that is causing a problem in the Form.designer.cs/vb file? Occasionally there are name qualification issues that result in the error you are seeing. Try opening up the designer file and changing the name as follows
C#
global::MyNamespace.MyType
VB.Net
Global.MyNamespace.MyType
After that, rebuild and reopen the designer

Resources