DataGridView in .NET Compact Framework 3.5 - compact-framework

I know that there is a DataGrid control in CF. However, is there a DataGridView control in .NET Compact Framework 3.5?

According to the documentation: http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.aspx
The DataGridView is not supported in CF, as it is not listed in the version information section at the bottom of the page.

Related

Unable to copy-paste Winforms controls from a form in a vb.net project to a form in a c# project

for a big refactoring project of about 140 forms I've been trying to copy and paste these controls through the designer. I'm using VS 2022 but I've also tried with 2019. The origin project is in .NET4.5 and the new project is in dotnet6. My machine is running on win10.
These are the things I've tried so far:
keyboard shortcuts ( ctrl-a + ctrl-c / ctrl-x + ctrl-v )
Drag 'n drop ( ctrl-a + drag + drop )
Same methods as above but one control at a time ( total size of clip is 164k bytes )
The paste option in the context menu of the c# form is grayed out and when I drag 'n drop I'm shown a "blocking" icon.
I'm at a loss and not about to redesign all these forms.
Am I missing something here?
I just did some testing and it appears that you cannot drag and drop - or copy and paste, presumably - between different instances of VS, which you appear to be trying to do. I opened the same solution twice and I was able to drag and drop between C# and VB projects in the same instance but I wasn't able to do so between two forms in the same VB project between instances.
This means that you will have to add one of the projects to the solution containing the other. That's not a big deal because adding an existing project to a solution doesn't move or copy that project. The solution simply refers to it in its existing location. Once you've done all the drag and drop, you can simply remove the project from the solution again and you're done.
According to this post, .NET framework 4.x is incompatible at the binary level with .NET core which prevents you from copying over controls. Logical really when I come to think about it.
I've tested with dotnet5.0 and dotnet6.0 both giving issues but dotnet4.8 works just fine.
As a solution to my problem I will try using an intermediate project in .NET framework 4.8 using c# and afterwards porting to dotnet6.
Thanks for the help.
You cannot directly copy control from .NET Framework 4.x to .NET6 in winform application, because .NET Framework and .NET6 are different frameworks, so if your project only targets windows, you can consider updating the project to .NET Framework 4.8 which allows you to copy-paste Winforms controls.
In order to convert VB project(.NET Framework) to C# project(.NET6), one of the option is to convert VB code in the InitializeComponent method to C#, and paste it into the same location in .NET 6.
Also check : Upgrade a Windows Forms App to .NET 6 with the .NET Upgrade Assistant
Note: some libraries in .NET Framework are not supported on .NET6, you may need to find their alternatives.

Crystal Report Viewer

Previously I use vb6 with crystal report and i use the crystal report viewer with vb6 to preview the report.
now i moved to vb.net 2010 where i cannot find the crystal report viewer Activex control? i specially want to use crystal report Activex viewer in dot.net because it will allow the user to edit the report as user has need,
if the crystal report activex viewer cannot support then give me way to modify the crystal report file after the exe has been build in vb.net 2010?
.NET uses .Net DLLs, not Active X controls. When in .Net Studio...you will be looking for the DLL's that support run time operations...NOT an ActiveX. Dig back into your documentation and samples...it should be covered there.
As Juan said you need to look for .Net DLLs in order to use CrystalReportViewer.
From your question I am assuming you already have installed Crystal Report 13 for Visual Studio 2010. If you haven't https://www.sap.com/india/products/crystal-visual-studio.html this is the link from where you can download it.
Now coming to your question of not being able to find dll of CrystalReportViewer You need to follow these steps:
First in your menu bar go to project and go to properties of the project.
Go to Compile section, then to advanced compile options.
Go to Target Framework by default it will be on ".NET Framework 4 Client Profile" set it to ".NET Framework 4".
Restart your Visual Studio.
Voila you can see it.
Link to download .net Framework 4
https://www.microsoft.com/en-in/download/details.aspx?id=17718
Mark it as Accepted Answer if it works for you.

Reason for toolbox items being greyed out [duplicate]

I'm trying to add a chart to my Visual Studio form but the button is greyed out. I'm using .NET Framework 3.5 and C#. Following instructions online I've downloaded and installed the dll files from this link: http://www.microsoft.com/en-us/download/details.aspx?id=14422
I also added them as references and added the following line at the top of my form file:
using System.Windows.Forms.DataVisualization.Charting;
but the button is still greyed out.
What have I missed?
To make the chart control available, you need:
To be using .Net framework 4.0 or higher, OR for .Net framework 3.5 install this: http://www.microsoft.com/en-us/download/details.aspx?id=14422
On the toolbox context menu -> Choose Items... have the Chart control selected. (Sort by name in the Choose Toolbox Items dialog and scroll to Chart. There are two: one for Windows forms, one for Web forms. You need only select what's relevant.)
The chart control appears in the "Data" section of the Toolbox.
You do NOT need to any any "using" clause to the form source file, or any reference in the project references. (The reference is added automatically for you when you add the control.)
I too had this issue and could not resolve it for hours.
As posted here:
Visual Studio 2010 toolbox controls disabled or inactive
In order to solve it for me I just right-clicked one of the items in the toolbox, and chose "Reset Toolbox"
This resets the entire toolbox, so as mentioned in the answer above, all custom tools are lost and need to be re-imported.
Had the same problem.
What I did was to make sure that I was using the same Framework with the chart framework version.
During project creation, by default using .net 3.5. But since the chart is written for Framework 4.0, it will not work with 3.5.
You need to change the solution or project Framework to 4.0 or above by doing this:
On the menu bar of Visual Studio, click <your project name>/Properties.
Change target framework to 4.0 or above.
Save the properties setting.
Rebuild your solution.
After this, you may use that chart component.

Textbox border property for a Textbox in .net 2.0

In VB.net a textbox does not have border color property. But i want a control with border color property. I have tried the code mentioned in this link. By using it i was able to create a control which can be added to visual studio and can be used. It works fine for me for .net 3.5 target projects. But it does not work for .net 2.0 targeted project. The border color does not change.i have even tried building the control(dll) using .net 2.0 target and adding it to project but it didn't work. So please help me on it or any alternative for it
An easier solution may be to draw a rectangle around your textbox and set the textbox border to nothing
The Visual Studio Visual Basic Power Pack as a rectangle you can add behind your textbox. Look at the bottom of your Toolbox - may be WinForms only. Or download latest from MS

Microsoft Chart Controls in Visual Studio 2010?

Is this possible? I installed them, but they don't appear. Do I have to import them or something?
If you cannot see the Chart control in the Toolbox, right click in the Toolbox, select Choose Items, and then select the following namespaces in the .NET Framekwork Components tab:
System.Web.UI.DataVisualization.Charting
System.Windows.Forms.DataVisualization.Charting
Please, take a look: How use MS chart control with VS 2010?
I haven't tried it with VS2010, but I would assume the process for using it is exactly the same as described there for other versions of VS. It won't appear in the tool box until you instal the add-ons
According to this blog post from January 2010:
The Microsoft Chart Control is available as separate installation for .NET Framework 3.5 and will be included in .NET Framework 4.0.
It could be that the controls haven't been updated to work with VS2010 because of this. If they're not in the Beta 2 by default (I don't have it installed on this machine to check) then it might be that they're only going to be included in the full release.
The Chart controls are included in version 4. Here's where you can find the types:
ASP.NET:
http://msdn.microsoft.com/en-us/library/system.web.ui.datavisualization.charting.aspx
Winforms:
http://msdn.microsoft.com/en-us/library/dd489065%28v=VS.100%29.aspx