exporting data in excel using listview vb 6.0 - vb6

I'm new to vb 6.0 this is an existing project.
Suddenly the hardisk was corrupt so i take backup form sever and run in new hard disk and when the project run there is no issue but when ctrl+F5 (compile) OR build exe get this error given below.
Is there any reference missing or need to add

You need to add a component Microsoft Windows Common Controls 6.0 (SP6).
Go to Projects -> Components (Ctrl+ T) and check the checkbox for it.
Once this is added, you will also see extra components in the available GUI elements.

Regarding the screenshot it looks like you have referenced both OCX Libraries
Microsoft Windows Common Controls 5.0 (SP2) - comctl32.ocx
Microsoft Windows Common Controls 6.0 (SP6) - mscomctl.ocx
You can only use the ListSubItems collection with the Common Controls 6.0. If you want't to check which one is in use, you can open the .frm file in a TextEditor and search for the control name.
In front of the name you see either ComctlLib.ListView (5.0) or MSComctlLib.ListView (6.0)
You can also try to change the Library in the TextEditor. It worked with a sample project for me, but I'm not sure if there are properties used in your project that could break after the "switch" to the 6.0 controls.

Related

Cannot add my user control to the toolbox from DLL file

I created a custom WinForms control. When I added reference to the control's project for any project in the same solution, the control appeared in a WinForms designer toolbox and I can use it.
But I have problem to use it as an external library.
I built it and got a DLL file. When I add reference to the DLL file for a project, the control doesn't show in the toolbox. I tried also add it by "right click toolbox => choose items...", but I have an error: "'path to dll' targets a platform whose toolbox items cannot be enumerated dynamically".
Visual Studio 2022 Community .Net 6
I found the "answer" here: link
The only solution is workaround: Putting your controls in a NuGet package and referencing that

Missing "Ado.Net Entity Data Model" on Visual Studio 2013

I have created new web project but I can't find ADO.net Entity DAta Model to add it.
How to fix it or Install it ?
Go to "C:\ProgramData\Package Cache" and search for "EFTools.msi".
You should find two files, just install the most recent one (it should be about 960KB). This fixed the problem for me.
i have the same problem, but there is no "EFTools.msi" in "C:\ProgramData\Package Cache" for me...
UPDATE :
i download and install "Entity Framework 6 Tools for Visual Studio 2012 & 2013" and it solved the problem \m/
Download Link
Some web tutorials show a 'ADO.NET data entity model' item in the 'Models->Add' menu. In VS2015 this menu item is not shown. You need to keep drilling down by selecting 'New Item...' and then further selecting 'Data' from the pop-up dialog.
My solution was none like the above.
The .msi file was nowhere in the folders suggested in prior answers, nor doing a search in my hard drive found any EFTools.msi instances.
So the failsafe approach came through this article (since the author appears to have completely removed the page from the server, I've changed the URL to a version of the page stored in Google's cache), which was poorly written by a chinese fella, so I'm gonna try to rewrite the steps in a clearer way:
The solution is as follows:
Open your VS2013 installation ISO (or pop the DVD in) and navigate to "\packages\EFTools" folder;
There you will find 2 files (a .cab file and a .msi file);
Copy both files to a directory on your hard drive;
[Optional]: You can create in that same directory, an empty .txt file ("Log.txt") so that the installation log output will be redirected to it later;
Open a MS-DOS command prompt (with administrative rights) and type the command: EFTools.msi USING_EXUIH=1 /log "Log.txt" [NOTE: If you did not perform step #4, then you do not need to type from the ' /log' on (inclusive)]
Wait patiently while the installation process finishes. Takes quite some time (guess never hurts to remind you that this needs to be done with VS2013 closed). The installation should go fine, anything weird will be logged into the text file (the one you created in step #4).
Or, you might just double-click the .msi file if you are feeling brave..
After installation, open VS2013 and try adding a new item to the Models folder. The "ADO.NET Entity Data Model" should have reappeared under the "Data" tab.
Recognition goes to the anonymous chinese poster on that link (er, "Melinda"?) - xiè-xiè!
Be sure you are trying to do that in .Net Framework project. For example, when you are creating a project do not use a template called Windows Forms App (.Net Core), use Windows Forms (.Net Framework). The (.Net Framework) extension is important.
right click on your project--> properties---> framework target select 4.5 and should work.
It's only for Visual Studio 2012. For me this had no effect on 2013.
For the record, if you have Visual Studio 2015 RC, the "EFTools.msi" can't be downloaded from Microsoft
If you accidentally delete the "ProgramData" folder, the Repair option will not work, you have to use the Add or Remove features option from the installer, and check the SQL Server Data Tools
Make sure the type of project you've added is for .NET Framework and not for .NET Standard. The templates for adding things such as ADO.NET Entity Data Model are included for .NET Framework.
For Visual Studio 2017 the following works.
Create project:
Create new project of type 'Class Library'
Install 'Entity Framework' from NuGet
Now add datamodel:
In project click 'Add New Item'
Select 'Visual C# Items' -> 'ADO.NET Entity Data Model'
I recently added Entity Framework and installed in one of my many projects in a single sln file.
The thing is Entity Framework works on Framework higher than 3.5.
So Class Library of NET Standard wouldn't support Entity Framework, thus missing Ado.Net Entity Data Model, Since NET Standard console Library is Framework 2.0, changing the class Library to .NET Framework one, will include Ado.Net Entity Data Model.
I had the same issue, but found out that I was selecting ASP.NET Core web App, ASP.NET Core web App(MVC) etc, Instead Choose ASP.NET Web Application (.NET Framework) and you will get the ADO.NET Entity Data Model option.
Go to visual studio installer.
Add:
Entity framework tool 6
Download and install it.

visual studio 2010 ultimate designer error

I have installed Visual studio 2010 ultimate and when I try to open any window form from my existing window application project it gives me designer error as "The designer could not be shown for this file because none of the classes within it can be designed."
here is the image
Call Stack error message image
it works fine if I create new window application project, but giving problem for existing projects. Please help
Your question gives us very little to go on, considering you don't show us even a sample of the code that the designer is choking on.
My crystal ball tells me that you've created some custom control classes that inherit from other classes in your project. When the designer goes to load that custom control class, it tries to instantiate its base class, and so on up the inheritance hierarchy. If it doesn't find one of those base classes, it errors.
The solution is simple: make sure that you've built the application/library first, before trying to open any of its custom controls in the designer. That way, all of the dependencies exist and are available to the designer.
Another possible problem, along the same lines, is that your custom controls are using some functionality only available in the full version of the .NET Framework, but your project is set to target the Client Profile. To fix this, open your project's Properties window and change ".NET Framework 4.0 (Client Profile)" to ".NET Framework 4.0".
If none of that fixes the problem, the last glimmer I can see in my crystal ball is based off the name of the code file that you've shown us in the screenshot: ExtraServices.cs. That doesn't sound to me like the name of a control. It sounds like that's just a regular old class. If that's the case, you can't design it because there is nothing for the designer to display. The only code files that can be opened in the designer are those that inherit from System.Windows.Forms.Control or one of its derived classes (e.g. System.Windows.Forms.Form). Just right-click on it and open it as a regular code file.

Can't get TeeChart into VS2010

I am trying to add TeeChart to a VS2010 C++ project. I don't want to drag the TeeChart icons onto a dialog as I want to create the chart in my code to display at runtime. I have installed the TeeChart demo version on my PC, but I can't see an entry in the registry - is that ok?
I was expecting to just have to import a dll into my project and then call the methods, but I can't see from the help files what dll to use, or do I have to include a .lib?
Yes, that's correct. The demo version is fully functional but doesn't install any design-time license and expires after 40 days. You should use TeeChart.dll for your projects.

how to remove a referenced component in VB6.0 Project

Currently doing a VB 6.0 project,after registering few ocx files added the same in the projects initially and removed it later and done the above steps from a different location with the same ocx files.Now i am having two controls with same name present in the component dialog, want remove the unwanted reference how to do it.please help me out
Usually the components appear after adding a reference throught Project->References. You can surely google wich dll is associated with which ocx.
I got a similar issue and after a few hours of digging in, I found out a solution. You need to go to Regedit and find by name your dll. Visual Basic 6.0 IDE registers it in the registry so it's not possible to remove it from IDE UI. After removing key in Regedit and restarting IDE, unwanted reference disappeared.

Resources