p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Visual Basic 2010 General Discussion (http://p2p.wrox.com/forumdisplay.php?f=580)
-   -   Moving up from VB5 to VB 2010 (http://p2p.wrox.com/showthread.php?t=83061)

VB2010Newbie March 25th, 2011 08:40 PM

Moving up from VB5 to VB 2010
I've been programming in VB5 for several years and have decided it's time to move up to VB 2010. The environment looks tantalizingly familiar but totally foriegn at the same time. I'm a little daunted. Two questions to start:

1) In VB5 you can build a form in one project and reuse it in another by copying two files (FORM.frm and FORM.frx). How do you do this in VB 2010, there doesn't seem to even be an option to "Add Existing Form"? Also once you add a form, how do you remove it?

2) In VB5 you can Dim objects as Database, RecordSet, and QueryDef and using an SQL string create a QueryDef that will load a Recordset from a Database and in code manipulate the resulting Recordset. How can I do basically the same thing in VB 2010?

GeneBuchite March 26th, 2011 08:35 AM

Huge Step.
There are 3 files that VB2010 uses for each form. The easiest and safest wat to move them is to open a project that you want to move a form into, or open a new project. ON the right pane you will see the solution explorer, if not press ctrl + alt + L. in the solution explorer right click the solution name, then click add. Then select existing Item. navigate to the folder where the form was saved.
To delete Right click the Form name you want to delete in the solution explorer, then select delete.

Now Data Access is a whole nother Ball Game... Not nearly as easy as form moving.... VB5 only used DAO. NOt to worry. Data can be move into other data formats... Later. There are 3 Main Data Access Protocols used with VB2010 . All of them a bit more involved than DAO.

I hate to suggest a diferent publisher than Wrox, because I love this P2P site!! but I had really good luck with MAstering Visual Basic 2010 Sybex Publishing... http://www.sybex.com/go/masteringvb2010. It was very much worth the price.

Check my Profile if you want more direct help.

VB2010Newbie March 26th, 2011 08:49 AM

Huge Help
Thanks, this is a big help. You said there were three files, could you tell me which files they are. My brother and I collaborate on projects, each developing a different form for the project - he lives in Nebraska and I live in Texas so we need to email the form files back and forth.

OK - now help me out with this forum (first time here as well). I saw somewhere when I was registering that if you appreciated someone's post you should click a "Thank You" response - I appreciate your help, so how do I do that?

Also, you said to "Check your profile?" What's that and how do I do it?

GeneBuchite March 26th, 2011 12:09 PM

If your form is named " Form1" Then 3 Files Will Be... Form1.VB, Form1.Designer.vb, And Form1.resx. After Transfering the file you will need to Add the Form like I discussed earlier.

There is a better way of doing what you are wanting to do using the team foundation server; altho it is way above what I have been able to learn so far.

To View my Profile just Click on my username "GeneBuchite" anywhere you see it in the Forum, under the "Last Post" Heading. IE VB 2010 Book Beginning Microsoft Visual Basic.

VB2010Newbie March 26th, 2011 12:36 PM

Thanks, that is exactly what I need at the moment. And I am sure there are a lot of things that I do that there are better ways to do them - maybe sometime in the future but I have a long learning curve with just what I have chewed off.

By the way - I checked out that book you suggested and have decided to get it. I found a pretty good deal on it at Amazon.com - just $37 vs $60 at the Sybex site.

I'm glad there are experienced guys like you willing to help out a newbie. I very much appreciate your help.

GeneBuchite June 17th, 2011 09:33 AM

Egg on My Face...
It has been quite a while since posting about reference material. I hope the book I suggested has helped make the transaction between Vb5 And vb.net 4 relatively smooth. I owe a BIG appology to WROX for suggesting that you look at other books besides theirs. altho the suggested book did help me with the transition; the book "Professional Visual Basic 2010 and .net 4 " Goes into depth, teaching about the DataContext, from beginning to end. Datacontext makes use of LINQ in ways that are much faster to code than what is presented in the other book... Wish Barns & Noble had in on their shelf when I first looked for help with vb.net4!
Kudos to Wrox... again. Sorry to have strayed!
After 2 hours of studying books on the shelf at Barns & Noble, I came to the conclusion that "Professional Visual Basic 2010 and .net 4 " is The authority on Database programming with vb.net

All times are GMT -4. The time now is 08:49 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.