Download presentation
Presentation is loading. Please wait.
Published byJudith Washington Modified over 8 years ago
1
Transferring VB.NET programs from VS2005 to VS2003 It’s Cheezy, but it works. W Machuca, PHD MHCC-CIS
2
Create your program in 2005
3
Solution You need to transport the critical code to 2003 You need to transport the critical code to 2003 You will create 2 NotePad txt files. One for the form data and one for the event commands. You will create 2 NotePad txt files. One for the form data and one for the event commands.
4
Open “Show All Files” This shows you the Windows generated code for your Form 1 2 3
5
Select All and copy into NotePad Save It
6
Display the Code Behind 1
7
Select All and copy into NotePad Save It Now you have 2 NotePad txt Files for your program. Bring them to school.
8
At School, Launch 2003
9
Make a small label to generate internal code 1 Making a label will create internal code which will make It easier to see what to do.
10
Open your form in NotePad Find “Note”. Find the word NOTE in the NotePad where you stored your form Find the word NOTE in the NotePad where you stored your form Start a select there and go all the way to just before the last line. (do not include End Class) Start a select there and go all the way to just before the last line. (do not include End Class) Do a Copy Do a Copy
11
Why? This puts your 2005 form information onto the clipboard. This puts your 2005 form information onto the clipboard. Now, go back to Visual Basic and switch to the code behind. Now, go back to Visual Basic and switch to the code behind.
12
Find “NOTE” in the Code Behind 1
13
Do Place your insertion point just before NOTE. Then drag down to the End Sub statement just before #End Region. Place your insertion point just before NOTE. Then drag down to the End Sub statement just before #End Region. With that now highlighted, select Paste and your 2005 form will replace the 2003 form. With that now highlighted, select Paste and your 2005 form will replace the 2003 form.
14
Why? There are certain commands above the NOTE which are required by 2003 and which are not in 2005. You cannot lose those. There are certain commands above the NOTE which are required by 2003 and which are not in 2005. You cannot lose those. The commands that create the form layout are consistent between 2003 and 2005 and can be over-written. The commands that create the form layout are consistent between 2003 and 2005 and can be over-written. But wait… But wait…
15
Remove Undefines In the code you will find some commands which are under- Lined. Delete them. **Carefully**
16
Almost there – Switch to form view The form which you made at Home should appear!
17
Now Open the Code NotePad Select only the code Select only the code Do not select the Public Class or End Class statements Do not select the Public Class or End Class statements Copy Copy
18
Return to 2003 and paste into code behind Paste into the code behind Between the #End Region And End Class statements
19
And you have it. This is a bit “clunky”, but you can do it! This is a bit “clunky”, but you can do it!
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.