Transferring from VB6 on Win XP to vb.net on Win 8.1
Transferring from VB6 on Win XP to vb.net on Win 8.1
Transferring from VB6 on Win XP to vb.net on Win 8.1
Transferring from VB6 on Win XP to vb.net on Win 8.1
Transferring from VB6 on Win XP to vb.net on Win 8.1
Transferring from VB6 on Win XP to vb.net on Win 8.1 Transferring from VB6 on Win XP to vb.net on Win 8.1 Transferring from VB6 on Win XP to vb.net on Win 8.1 Transferring from VB6 on Win XP to vb.net on Win 8.1 Transferring from VB6 on Win XP to vb.net on Win 8.1 Transferring from VB6 on Win XP to vb.net on Win 8.1 Transferring from VB6 on Win XP to vb.net on Win 8.1 Transferring from VB6 on Win XP to vb.net on Win 8.1
Transferring from VB6 on Win XP to vb.net on Win 8.1 Transferring from VB6 on Win XP to vb.net on Win 8.1
Transferring from VB6 on Win XP to vb.net on Win 8.1
Go Back  Xtreme Visual Basic Talk > > > Transferring from VB6 on Win XP to vb.net on Win 8.1


Reply
 
Thread Tools Display Modes
  #1  
Old 01-30-2014, 09:52 AM
bobcory's Avatar
bobcory bobcory is offline
Contributor
 
Join Date: Jun 2003
Location: NW UK
Posts: 454
Question Transferring from VB6 on Win XP to vb.net on Win 8.1


I am currently running VB6 on a Win XP laptop and am finally about to transfer to vb.net (ten years late, I know)

I have a Win 8.1 laptop but have no wish to make two jumps at the same time so am thinking of proceeding as follows

1. Download 2008 Visual Express (I understand it has conversion routines whereas 2010 does not) and install on win xp laptop

2. Get application working as vb.net

3. Transfer to win 8.1 laptop

I need to be able to distribute my application (which is freeware)

I appreciate that most people did this years ago .. any comments and help appreciated
.
__________________
MOPEKS - a freeware program that generates programs that use each other to solve problems. Is this the correct route to a genuinely intelligent machine?
.
Reply With Quote
  #2  
Old 01-30-2014, 12:07 PM
passel's Avatar
passelTransferring from VB6 on Win XP to vb.net on Win 8.1 passel is offline
Sinecure Expert

Super Moderator
* Guru *
 
Join Date: Jun 2003
Location: Upstate New York, usa
Posts: 8,026
Default

My impression is the conversion done from VB6 to VB.Net by the tool is usally close to rubbish, but I don't remembering trying to convert any of my VB6 code. I've just used the VB6 code as a "design" or requirements guide, and rewrote it, but I don't usually have large projects.
Since it only costs time to get 2008 Express, and then try the conversion out, it shouldn't be a much out-of-pocket expense, and you can add your voice to the viability of going through the conversion experience.
Since the way VB does drawing is completely different, the conversion probably does nothing for you in that area, so if your freeware does a lot of graphics, it will probably all need to be rewritten by hand anyway.
I guess it you're talking about MOPEKS, then I don't think I've looked at enough of it to estimate how convertible that is. I'm sure that is a huge project.
Best of luck to you.
__________________
There Is An Island Of Opportunity In The Middle of Every Difficulty.
Miss That, Though, And You're Pretty Much Doomed.
Reply With Quote
  #3  
Old 01-31-2014, 04:41 PM
hDC_0Transferring from VB6 on Win XP to vb.net on Win 8.1 hDC_0 is offline
Contributor

* Expert *
 
Join Date: Feb 2004
Posts: 560
Default Going from VB6 to VB.Net (eyeing maximum Win 8.1 compatibility)

Just to add a little bit to what passel said..
Getting from VB6 to VB.Net 2008 (with probably a lot of manual code rewriting) is only part of fully upgrading for Windows 8.1.

VS.Net Express now (since 2012) comes in two "flavors" (ignoring the non-VB.Net oriented Web and Phone Express edition):
VB.Net Express (designed for developing Windows Store apps) and
VB.Net Desktop Express (designed for developing Windows Desktop applications).

They are not the same.

So after you get things working under VB.Net 2008, you should be able to open it under one of the VB.Net Desktop express versions (2012 and 2013) designed for the Windows 8/8.1 Desktop, and have it do the normal auto-conversion (upon opening the solution) between VB.Net versions.

However, Windows Store Apps are different, so be careful you only use the Desktop version of VB.Net express (unless you eventually hope to release a Windows Store App version of your software as well to work on the Windows 8.1 Start screen).
Best Practices for migrating Windows 7 desktop apps to Windows Store apps

Last edited by hDC_0; 01-31-2014 at 04:50 PM.
Reply With Quote
  #4  
Old 02-01-2014, 01:31 PM
Gruff's Avatar
GruffTransferring from VB6 on Win XP to vb.net on Win 8.1 Gruff is offline
Bald Mountain Survivor

Retired Moderator
* Expert *
 
Join Date: Aug 2003
Location: Oregon, USA - deceased
Posts: 6,440
Default

I have to agree. I tried the conversion tool when i first started out with VB.NET.
I quickly gave up trying to use it. It was not a replacement for learning VB.NET.
Not even a leg up IMHO.

I would start with a small well understood VB6 app and rewrite it in VB.NET looking
for advantages the new technology offers.
I was pleasantly surprised at how quickly it came together once I got past the general concepts and overviews.

It helps if you use intellisense and help to explore the often used namespaces
(Class groupings). For instance:
System.IO.Path, System.IO.Directory and System.IO.File
These contain many tools the converter will ignore in favor
of the somewhat backwards compatible file tools in the namespace:
Microsoft.VisualBasic.

In general I found the conversion was not perfect and the more complex
or non-standard your code the more mistakes it made.
__________________
Burn the land and boil the sea
You can't take the sky from me


~T
Reply With Quote
  #5  
Old 02-03-2014, 09:16 AM
bobcory's Avatar
bobcory bobcory is offline
Contributor
 
Join Date: Jun 2003
Location: NW UK
Posts: 454
Default

Many thanks everybody.

Well, I downloaded vb 2008 express and it installed OK. The conversion Tool in 2008 is close to useless IMHO so if I were starting again I would download 2010 (which has no conversion tool) but runs on Win XP, which is what I need right now

One irritating thing is that you cannot use MZ Tools with the Express Version (no add on manager evidently) so Vb.net may be better than vb6 but right now I feel like I am going backwards as there are numerous things I could do before that I now cannot do.

[rant]Doubtless if Microsoft ruled the world we would have a new language ("English is too restrictive") and a new alphabet ("A to Z is insufficient for modern needs") every 10 years or so. [/rant]

So, if there are any other dinosaurs still out there, hope this thread is useful

PS One thing that does look like a vast improvement is file handing and looping through directories and all of that kind of stuff - or maybe I am just being optimistic for a moment?
.
__________________
MOPEKS - a freeware program that generates programs that use each other to solve problems. Is this the correct route to a genuinely intelligent machine?
.

Last edited by bobcory; 02-03-2014 at 09:41 AM.
Reply With Quote
  #6  
Old 02-03-2014, 11:24 AM
PlausiblyDamp's Avatar
PlausiblyDampTransferring from VB6 on Win XP to vb.net on Win 8.1 PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

Out of interest what features from MZ Tools are you finding hard to do without? The IDE for .Net has a lot of functionality built in.

Also if you aren't tied to 2008 I would strongly recommend upgrading to 2010 anyway as there are a lot of IDE improvements.
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
  #7  
Old 02-04-2014, 07:52 AM
bobcory's Avatar
bobcory bobcory is offline
Contributor
 
Join Date: Jun 2003
Location: NW UK
Posts: 454
Default

Quote:
Originally Posted by PlausiblyDamp View Post
Out of interest what features from MZ Tools are you finding hard to do without? The IDE for .Net has a lot of functionality built in.

Also if you aren't tied to 2008 I would strongly recommend upgrading to 2010 anyway as there are a lot of IDE improvements.
In MZ Tools I use

1. Auto sort of routines in a module or form
2. Ability to add a Procedure Header
3. Error handling routine which also uses REAL line numbers (2008 has sort of pseudo line numbers)
4. Ability to use REAL line numbers so that I can identify which line an error is on once the project is compiled and distributed

I will download 2010 Express now that I know the converter is useless!
__________________
MOPEKS - a freeware program that generates programs that use each other to solve problems. Is this the correct route to a genuinely intelligent machine?
.
Reply With Quote
  #8  
Old 02-04-2014, 10:38 AM
PlausiblyDamp's Avatar
PlausiblyDampTransferring from VB6 on Win XP to vb.net on Win 8.1 PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

Line numbers are always going to be a problem in released software as the compiler will optimise your code when doing a release build - this means all line numbers are potentially suspect as code could be moved around or even omitted entirely.

In a lot of cases though the stack trace associated with an exception is enough to identify the method at fault and as long as the method isn't excessively large that can often be enough to track down a problem. I tend to find that if my methods are so long and complex that the stack trace isn't enough then I will refactor the code into smaller and more testable methods anyway, or failing that I will try to emulate the problem under a debug build as this will give accurate line numbers.

As to the other two I am not sure if there is anything built in for them. I don't normally care too much about the order of methods and prefer to group them by functionality when I do care, I tend not to create large header comments for procedures either so never looked for anything that did that, although a code snippet could probably do the job for you and wouldn't be too hard to create.
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
  #9  
Old 02-05-2014, 08:14 AM
bobcory's Avatar
bobcory bobcory is offline
Contributor
 
Join Date: Jun 2003
Location: NW UK
Posts: 454
Default

Quote:
Originally Posted by PlausiblyDamp View Post
Line numbers are always going to be a problem in released software as the compiler will optimise your code when doing a release build - this means all line numbers are potentially suspect as code could be moved around or even omitted entirely.
I am a little confused by this. In VB6, MZ Tools puts in line numbers so that every single line of code written in VB has a line number. Obviously, the compiler can do its stuff but I assuming MZ Tools have really done their job, when it fails, the line number should show! Presumably the compiled code has some kind of reference to the original line number.

Anyway, in my experience, it always has always worked very well - and I miss it in vb.net. I will probably upgrade to Professional (or whatever the cheapest non express model is called) so i can then use MZ Tools

Here is a sample of what it looks like in VB6

Code:
Private Sub cmdEnd_Click()
        'Written 5th August 2010

10      On Error GoTo cmdEnd_Click_Error

20      EnderLUVB

30      On Error GoTo 0
40      Exit Sub

cmdEnd_Click_Error:

50      ErrorLoggerLUVB Err.Source, Erl, "Error " & _ 
         CStr(Err.Number) & " (" & Err.Description & _
          ") in procedure cmdEnd_Click of Form frmAirlock"
        
End Sub
At the bottom is a screenshot of a failure in the compiled version running (ie the exe file) showing the code in the background - note divide by zero in line 1105
.
Attached Images
File Type: jpg ScreenShot003562.jpg (162.8 KB, 7 views)
__________________
MOPEKS - a freeware program that generates programs that use each other to solve problems. Is this the correct route to a genuinely intelligent machine?
.

Last edited by Gruff; 02-07-2014 at 01:14 PM.
Reply With Quote
  #10  
Old 02-05-2014, 08:59 AM
PlausiblyDamp's Avatar
PlausiblyDampTransferring from VB6 on Win XP to vb.net on Win 8.1 PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

When you do a release build you can still get the compiler to generate the debug symbols (.pdb files) - this will give you more accurate information in your stack traces etc. Have you tried that yet?

I must admit though I never bother with line numbers in the source, if I have a line number to reference VS can jump me there without them being explicit. Every time code is added, moved or deleted line numbers are going to need to change, far easier to not use them IMHO. If the line numbers are being auto generated then it makes tracking changes via any kind of source code control very difficult as it looks like most of the file has changed when in reality it might just be a few lines that have caused all other lines to be renumbered.

Then again the VB 6 and earlier form of error handling (On Error ...) is pretty horrible anyway, under .Net exceptions (Try, Catch, Finally) are far cleaner in nearly all situations.
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
  #11  
Old 02-07-2014, 01:09 PM
Gruff's Avatar
GruffTransferring from VB6 on Win XP to vb.net on Win 8.1 Gruff is offline
Bald Mountain Survivor

Retired Moderator
* Expert *
 
Join Date: Aug 2003
Location: Oregon, USA - deceased
Posts: 6,440
Default

VB.NET does have line numbers. You just have to turn them on in options.
I also hardly ever use the feature. If you have the Error design-time or run-time
The IDE tool window "Error List" will display the errors including their line numbers.

Double clicking the Error in Error List will jump your editor to where the error is in your code. The error is also underscored in a wavy blue line in your code.

With these tools you really do not need to use the line numbers if you do not want to.
(See attached image.)
Attached Images
File Type: png VBNET_Errors.png (67.3 KB, 5 views)
__________________
Burn the land and boil the sea
You can't take the sky from me


~T
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Transferring from VB6 on Win XP to vb.net on Win 8.1
Transferring from VB6 on Win XP to vb.net on Win 8.1
Transferring from VB6 on Win XP to vb.net on Win 8.1 Transferring from VB6 on Win XP to vb.net on Win 8.1
Transferring from VB6 on Win XP to vb.net on Win 8.1
Transferring from VB6 on Win XP to vb.net on Win 8.1
Transferring from VB6 on Win XP to vb.net on Win 8.1 Transferring from VB6 on Win XP to vb.net on Win 8.1 Transferring from VB6 on Win XP to vb.net on Win 8.1 Transferring from VB6 on Win XP to vb.net on Win 8.1 Transferring from VB6 on Win XP to vb.net on Win 8.1 Transferring from VB6 on Win XP to vb.net on Win 8.1 Transferring from VB6 on Win XP to vb.net on Win 8.1
Transferring from VB6 on Win XP to vb.net on Win 8.1
Transferring from VB6 on Win XP to vb.net on Win 8.1
 
Transferring from VB6 on Win XP to vb.net on Win 8.1
Transferring from VB6 on Win XP to vb.net on Win 8.1
 
-->