Convert code .Net4.0 to code .Net 2.0
-
You have to rewrite the code. The code that's throwing these errors is using features of C# that were not around in 2005. In your examples, it's using a shortcut to setting properties after creating an instance of Control. You just have to break those lines inside the curly braces out into their own lines of code.
A guide to posting questions on CodeProject
Click this: Asking questions is a skill. Seriously, do it.
Dave Kreskowiakfollow you fix solutions how not ? I'm secrets can you help me ?
-
follow you fix solutions how not ? I'm secrets can you help me ?
Uhhh...Yoda just read that and went "What?" If you're asking me to rewrite the code for you,that's not going to happen. I've got my own code to write and I've got a few hours work left before I can go to sleep tonight.
A guide to posting questions on CodeProject
Click this: Asking questions is a skill. Seriously, do it.
Dave Kreskowiak -
Uhhh...Yoda just read that and went "What?" If you're asking me to rewrite the code for you,that's not going to happen. I've got my own code to write and I've got a few hours work left before I can go to sleep tonight.
A guide to posting questions on CodeProject
Click this: Asking questions is a skill. Seriously, do it.
Dave Kreskowiakno need to rewrite the code, the original was this error No overload for 'splitter1_SplitterMoving' matches delegate 'System.Windows.Forms.SplitterCancelEventHandler' you fix this ?
-
no need to rewrite the code, the original was this error No overload for 'splitter1_SplitterMoving' matches delegate 'System.Windows.Forms.SplitterCancelEventHandler' you fix this ?
No, I can't. You typed the code and I can't see it. The error is telling you that you've got the method header parameter list for "splitter1_SplitterMoving" wrong.
A guide to posting questions on CodeProject
Click this: Asking questions is a skill. Seriously, do it.
Dave Kreskowiak -
it is in this article you http://stackoverflow.com/questions/28878310/custom-paint-splitter-control-in-c-sharp-winforms I'm copy them, but it's not run, want to converter to C#2005 (.Net 2.0)
-
no need to rewrite the code, the original was this error No overload for 'splitter1_SplitterMoving' matches delegate 'System.Windows.Forms.SplitterCancelEventHandler' you fix this ?
Look, an example of the SplitterMoving event[^]. Take a look at the event handler there and compare it to yours.
This space for rent
-
I have the following code C# 2008 want to switch to the C#2005 Net2.0 after his move has been an error, thanks to the help available tracks. [CODE] //C# 2008 namespace Example1 { public partial class Form1 : Form { Control draggingControl = new Control{ BackColor = Color.Green, Visible = false }; // warning error here public Form1() { InitializeComponent(); // ... } // ... } } [/CODE] [CODE] //C# 2005 //... Control draggingControl = new Control(); draggingControl.BackColor = Color.Green; // warning error here draggingControl.Visible = false; // warning error here //... [/CODE]
The error I got by simply pasting the code into a blank project was
Quote:
Error 1 The name 'Color' does not exist in the current context
That went away when I included
using System.Drawing;
In a subsequent comment you stated
Quote:
the original was this error No overload for 'splitter1_SplitterMoving' matches delegate 'System.Windows.Forms.SplitterCancelEventHandler'
Nothing in the code you have posted nor in the link you provided produces that error - you will need to show us that code if you expect some help
-
Look, an example of the SplitterMoving event[^]. Take a look at the event handler there and compare it to yours.
This space for rent
your link posted nearly identical to my questions, your example changes the mouse pointer while dragging splitBar, my questions changes the color tranparen for splitBar while dragging splitBar. Thank you send me the link for referenceing
-
your link posted nearly identical to my questions, your example changes the mouse pointer while dragging splitBar, my questions changes the color tranparen for splitBar while dragging splitBar. Thank you send me the link for referenceing
You're welcome.
This space for rent
-
The error I got by simply pasting the code into a blank project was
Quote:
Error 1 The name 'Color' does not exist in the current context
That went away when I included
using System.Drawing;
In a subsequent comment you stated
Quote:
the original was this error No overload for 'splitter1_SplitterMoving' matches delegate 'System.Windows.Forms.SplitterCancelEventHandler'
Nothing in the code you have posted nor in the link you provided produces that error - you will need to show us that code if you expect some help
I declare libraries needed then but not run. you see my attach file SplitterPaint_[^]
-
You're welcome.
This space for rent
Hi, I have currently migrated my application from 2.0 to 4.0. What i suggest is try to build your code from target framework 4.0 to 2.0, also setting up the cpu type as x86 for 32 bit platform. Also, if there are some client side validation, you need to do settings in pages element attribute controlRenderingCompatibilityVersion=2.0 in web.config for the asp.net controls.
-Mayank Pant
-
Hi, I have currently migrated my application from 2.0 to 4.0. What i suggest is try to build your code from target framework 4.0 to 2.0, also setting up the cpu type as x86 for 32 bit platform. Also, if there are some client side validation, you need to do settings in pages element attribute controlRenderingCompatibilityVersion=2.0 in web.config for the asp.net controls.
-Mayank Pant
Don't know why you're telling me this. I know how to convert code. If you meant to tell the OP how to do this, they won't get any notifications that you replied to another person.
This space for rent
-
I declare libraries needed then but not run. you see my attach file SplitterPaint_[^]
-
Don't know why you're telling me this. I know how to convert code. If you meant to tell the OP how to do this, they won't get any notifications that you replied to another person.
This space for rent
Pete ! my bad. I just replied to your thread. That was not my intentions. Thank you for correcting me .
-
Don't know why you're telling me this. I know how to convert code. If you meant to tell the OP how to do this, they won't get any notifications that you replied to another person.
This space for rent
Hello friends ! Now, I do not Convert 2.0, I'm using 4.0, but still you see the error of my attachments SplitterPaint_[^]
-
I don't download unsolicited files from unknown sources. You can post code here or use something like imgur to show an image.
I checked and normal download you can tell me why you can not download ?
-
I checked and normal download you can tell me why you can not download ?
Because I do not download rar or zip files from unknown sources. If I was at work then it would be prevented by the firewall rules in place, at home it is a personal decision. It's a policy that might explain why up to now I have not been affected by any viruses