Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Conversion vb6 to VB 2008 Express

275 views
Skip to first unread message

George W. Barrowcliff

unread,
Sep 25, 2009, 7:10:37 PM9/25/09
to
I have an application developed by someone else using VB6 that needs a few
changes. Last guy is gone, so is VB6 environment.
I downloaded and installed 2008 Express, then converted application.

I have lots of errors (95) and 102 Warnings. I have cleared some of the
errors (down to 74) but some conversions I just don't get and need some help
in understanding the conversion.

Thanks to anyone that takes a look and points me somewhere.

GWB


i.e.
'Recordset' is not a member of 'System.Windows.Forms.Label'
'DataBaseName' is not a member of 'System.Windows.Forms.Label'
'ctlRefresh' is not a member of 'AxMSGBGrid.AxDBGrid'

These are repeated often and I cannot see why the wizard thinks that
Recordset should be a member of System.Windows.Forms.Label

Original

Private Sub pgrid_size()
Dim T_RS As Recordset
Set T_RS = db.OpenRecordset(tn, dbOpenDynaset)
Set pData.Recordset = T_RS
pgrid.Refresh
pgrid.Columns(0).Width = 700
pgrid.Columns(1).Width = 3500
pgrid.Columns(2).Width = 1500
pgrid.Columns(3).Width = 1500
pgrid.Columns(0).Caption = "Dr/Cr"
pgrid.Columns(1).Caption = "Account Name "
pgrid.Columns(2).Caption = "Debit(Rs.)"
pgrid.Columns(3).Caption = "Credit(Rs.)"
pgrid.RowHeight = 250
End Sub

After Conversion
Private Sub pgrid_size()

'UPGRADE_WARNING: Arrays in structure T_RS may need to be initialized before
they can be used. Click for more:
'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="814DF224-76BD-4BB4-BFFB-EA359CB9FC48"'

Dim T_RS As dao.Recordset

T_RS = db.OpenRecordset(tn, dao.RecordsetTypeEnum.dbOpenDynaset)

'UPGRADE_ISSUE: Data property pData.Recordset was not upgraded. Click for
more:
'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="076C26E5-B7A9-4E77-B69C-B4448DF39E58"'

pData.Recordset = T_RS

'UPGRADE_NOTE: Refresh was upgraded to CtlRefresh. Click for more:
'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="A9E4979A-37FA-4718-9994-97DD76ED70A7"'

pgrid.CtlRefresh()

'UPGRADE_WARNING: Couldn't resolve default property of object
pgrid.Columns().Width. Click for more:
'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'

pgrid.get_Columns(0).Width = 700

'UPGRADE_WARNING: Couldn't resolve default property of object
pgrid.Columns().Width. Click for more:
'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'

pgrid.get_Columns(1).Width = 3500

'UPGRADE_WARNING: Couldn't resolve default property of object
pgrid.Columns().Width. Click for more:
'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'

pgrid.get_Columns(2).Width = 1500

'UPGRADE_WARNING: Couldn't resolve default property of object
pgrid.Columns().Width. Click for more:
'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'

pgrid.get_Columns(3).Width = 1500

'UPGRADE_WARNING: Couldn't resolve default property of object
pgrid.Columns().Caption. Click for more:
'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'

pgrid.get_Columns(0).Caption = "Dr/Cr"

'UPGRADE_WARNING: Couldn't resolve default property of object
pgrid.Columns().Caption. Click for more:
'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'

pgrid.get_Columns(1).Caption = "Account Name "

'UPGRADE_WARNING: Couldn't resolve default property of object
pgrid.Columns().Caption. Click for more:
'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'

pgrid.get_Columns(2).Caption = "Debit(Rs.)"

'UPGRADE_WARNING: Couldn't resolve default property of object
pgrid.Columns().Caption. Click for more:
'ms-help://MS.VSCC.v90/dv_commoner/local/redirect.htm?keyword="6A50421D-15FE-4896-8A1B-2EC21E9037B2"'

pgrid.get_Columns(3).Caption = "Credit(Rs.)"

pgrid.RowHeight = 250

End Sub


Scott M.

unread,
Sep 25, 2009, 7:21:52 PM9/25/09
to
The fact is that "converting" VB 6 code to VB .NET is often not worth the
trouble. VB .NET is not just the new version of VB, it's an entirely new
language running on an entirely new Framework.

As such, many of the objects you used in your old code no longer exist in VB
.NET and you will have to rewrite the applicaiton if you want to take
advantage of those new objects.

There is no Recordset in .NET. You'll need to come up to the new .NET data
objects, known collectively as ADO .NET.

-Scott


"George W. Barrowcliff" <george.ba...@flash.net> wrote in message
news:ek6QuVjP...@TK2MSFTNGP05.phx.gbl...

zp18

unread,
Sep 25, 2009, 7:56:43 PM9/25/09
to
<Snip!>


Is the alternative going back to VB6? I'm OK with that since at this
time
only a few minor changes are needed. I thought that the Express VB
product
would do the job but I have spent a ton of time in trying to get this
converted.

Since the VB6 environment is gone also, cd's, books, etc. I will need
to
find a copy somewhere on the used market if it exists.

Thanks for your quick answer.

GWB

Armin Zingler

unread,
Sep 25, 2009, 7:56:40 PM9/25/09
to
George W. Barrowcliff schrieb:

> I have an application developed by someone else using VB6 that needs a few
> changes. Last guy is gone, so is VB6 environment.
> I downloaded and installed 2008 Express, then converted application.
>
> I have lots of errors (95) and 102 Warnings. I have cleared some of the
> errors (down to 74) but some conversions I just don't get and need some help
> in understanding the conversion.

In addition to Scott (I agree with him): The application must be
compilable in VB6 on the machine that you use to convert it. Otherwise
the preconditions to convert it are not met. (if it wouldn't even run in
VB6, how could it in VB.Net?)
IMO, one should know both languages well to do the conversion.

--
Armin

Nobody

unread,
Sep 25, 2009, 10:36:37 PM9/25/09
to
"zp18" <irvin...@gmail.com> wrote in message
news:e52e58a5-7128-47da...@a37g2000prf.googlegroups.com...

> Since the VB6 environment is gone also, cd's, books, etc. I will need
> to
> find a copy somewhere on the used market if it exists.

VB6 is still available to MSDN Subscribers. Visual Studio 6, including VC6
are not.


Kevin Provance

unread,
Sep 25, 2009, 10:38:50 PM9/25/09
to

Yes, going back to VB6 would be your best bet. It's still a very viable
language without all the silly .Nxt BS that is really irrelevant. I could
probably hook you up with a free copy.


Alex Clark

unread,
Sep 26, 2009, 3:01:21 AM9/26/09
to
Wow,

So let's see - we've had racism, sexism, inappropriate language, jealousy at
others' superior knowledge to your own, and now you're advocating software
piracy of a Microsoft product on a Microsoft newsgroup?

"Kevin Provance" <fu...@localhost.com> wrote in message
news:edj96JlP...@TK2MSFTNGP02.phx.gbl...

Mike Williams

unread,
Sep 26, 2009, 3:33:04 AM9/26/09
to
"George W. Barrowcliff" <george.ba...@flash.net> wrote in message
news:ek6QuVjP...@TK2MSFTNGP05.phx.gbl...

> Last guy is gone, so is VB6 environment. I downloaded


> and installed 2008 Express, then converted application. I have lots of
> errors (95) and 102 Warnings.

You've been conned, George. Micro$oft have conned you by deliberately
leading you to believe that VB.Net is the next version of Visual Basic, when
it is not. It is a lie, George. A deliberate Micro$oft lie. VB6 is the last
and final version of Visual Basic. You'll need to rewrite your application
so you might as well rewrite it in something that is not from such an
untrustworthy company as Micro$oft. Try Delphi.

Mike

Armin Zingler

unread,
Sep 26, 2009, 6:48:17 AM9/26/09
to
Armin Zingler schrieb:

BTW, some trolls are visitting this group from time to time, frustrated
about not being able or willing to understand and keep up with the
brilliant achievements of newer versions of a product. You can safely
ignore them. :-)


--
Armin

Cor Ligthert[MVP]

unread,
Sep 26, 2009, 7:36:39 AM9/26/09
to
George,

Despite what others say, if you want at the end a program that is 10 times
faster then VB6 (what is possible with VB for Net), then converting is no
option.

However, If you have a straight written program, that not as most VB6
programs, because the lack of all the new classes now available in Net, is
written with all kind of calls to Win32 Apis or other from today's scope
seen obscure methods. Then you can try a convert.

Have a look at this page for your current problem.
http://support.microsoft.com/kb/315974

Be aware that it is not an easy job and if you are ready, you will ask
yourself why you did not do it all new like the others wrote, but in my idea
is it worth to try, all was it only because the experience you get from that
about VB for Net.

(You can do it also direct in Net, but you are than not gone through that
learning path which others here who write so easily to start direct with
Net).

95 errors is not much for an converting job because it is not impossible
that most are all the same and are just telling that a DLL is not available.

Just my idea,

Cor

"George W. Barrowcliff" <george.ba...@flash.net> wrote in message
news:ek6QuVjP...@TK2MSFTNGP05.phx.gbl...

Mike Williams

unread,
Sep 26, 2009, 8:01:26 AM9/26/09
to
"Cor Ligthert[MVP]" <Notmyfi...@planet.nl> wrote in message
news:%23BuPb2p...@TK2MSFTNGP04.phx.gbl...

> Despite what others say, if you want at the end a
> program that is 10 times faster then VB6 (what is

> possible with VB for Net) . . .

Put your money where your mouth is fatty. And change that picture on your
MVP profile. You look like a child molester with his head on upside down.


Family Tree Mike

unread,
Sep 26, 2009, 8:41:49 AM9/26/09
to
George W. Barrowcliff wrote:
> I have an application developed by someone else using VB6 that needs a few
> changes. Last guy is gone, so is VB6 environment.
> I downloaded and installed 2008 Express, then converted application.
>

If you want to upgrade your code to VB.net, then it will be easier to
learn and recode with VB Express from scatch, keeping the look and
algorithms from previous code.

If you want to go with VB 6, please move the question there as there
(Microsoft.Public.VB.General.Discussion). Many of the posts in this
thread from VB 6 zealots, though unproductive in this group, may be from
posters with reasonable advice when asked in the vb6 group.

--
Mike

C

unread,
Sep 26, 2009, 10:20:42 AM9/26/09
to
On 26 syys, 15:41, Family Tree Mike <FamilyTreeM...@ThisOldHouse.com>
wrote:

> George W. Barrowcliff wrote:
> > I have an application developed by someone else using VB6 that needs a few
> > changes.  Last guy is gone, so is VB6 environment.
> > I downloaded and installed 2008 Express, then converted application.
>
> If you want to upgrade your code to VB.net, then it will be easier to
> learn and recode with VB Express from scatch, keeping the look and
> algorithms from previous code.

I am in a similar situation, except that the decision is made: VB.net
will be used in future.

Over the last 14 years, thousands of lines of VB3-6 code has been
written, almost all of which is in use. I wonder how long it could
take to recode and not convert all of that. I cannot work full time as
a programmer. On the other hand, most of my VB6 code is relatively
simple - no databases, no communications with other programs or too
many APIs. There is just graphics, mostly plots of 4 kinds. Is
recoding a feasible option? Any estimate on how many weeks, months or
years it could take me? I wonder how many months it will take me to
learn "enough" of VB.net.

Ato_Zee

unread,
Sep 26, 2009, 11:00:32 AM9/26/09
to

> > > I have an application developed by someone else using VB6 that needs a
> > > few
> > > changes. �Last guy is gone, so is VB6 environment.
> > > I downloaded and installed 2008 Express, then converted application.

Depends on what is meant by a few changes.
From experience conversion is not a trivial task.
There are still authentic copies of VB6 on eBay, along with
a number of books.
VB6 is simple for old hands who are familiar with GW-Basic,
or one of its many flavours with similar commands.
Changes should be fairly simple using the original code as
a guide.
VB6 and eBooks are also available from a number of
sources for download, but then you need a good virus
checker, and preferably work on a spare machine.
A lot depends on how much work is needed and whether
you want to start from scratch with a fairly steep
learning curve.

Ato_Zee

unread,
Sep 26, 2009, 11:00:32 AM9/26/09
to

> Yes, going back to VB6 would be your best bet. It's still a very viable
> language without all the silly .Nxt BS that is really irrelevant. I could
> probably hook you up with a free copy.

At least one legit sealed VB6 authentic MS$ VB6 on eBay.
Horror of horrors, but seriously, there are some copies of VB6
offered on Pirate Bay.
http://thepiratebay.org/
You may have to carefully choose the download, look at the
comments and how many seeders, one looks a viable
well seeded download. Virus scan it first with a good
anti-virus. Use a spare machine to work on if you
have one, for things off PB. There are many books on
VB6 on eBay. VB6 is pretty easy to get up to speed on
if you remember the old days of TRS Basic, GW Basic,
BBC Basic, it uses much the same language and
constructs with a few tweaks.

Scott M.

unread,
Sep 26, 2009, 11:06:22 AM9/26/09
to
I own and operate an IT training company and am faced with this question all
the time. The fact is that VB 6 developers coming to .NET very often have a
harder time, in some respects, than people who have no prior programming
experience.

This is because of the incorrect impression that VB .NET is just VB 6, with
new features. That's not the case at all. As I mentioned in an earler post
VB .NET is a new language that runs on a completely different runtime than
VB 6.0. But, because (on the surface) VB 6 can look similiar to VB .NET,
many folks get the incorrect perception that they know enough VB 6.0 to just
jump into VB .NET and get stuff done (and done correctly!). This is false.

You should move to .NET because it's already got 8 years of a track record
as the successor to VB 6 and because it is much more in line with other
modern OO languages. Those who tell you that VB 6 still has its place for
new application development, are just plain misinformed and/or uneducated
about what .NET is all about.

I can't tell you how long it would take you to "convert" your VB 6 apps.,
becuase, in many cases, a complete rewrite would be necessary, in order to
reap the full benefits of .NET.

Take it from someone who has made the transition as well as teaches others
how to make the transition, start learning .NET with your eyes wide open and
don't assume that you know how somthing should be done or how something
works because of your VB 6 experience. I can say that after 6 months of
learning and practicing with VB .NET, you should begin to "get it" in terms
of how .NET differs from VB 6 (and other forms of classic Windows and
Internet) programming.

Just a couple of quick examples:

This method declaration works in both VB 6 and in VB .NET, but it works
differently in .NET than in VB 6:

Public Sub Foo(x As String)

In VB 6, when you didn't specify how a parameter should be passed, it was
passed ByRef by default. In .NET, all parameters are passed ByVal by
default. Not knowing that simple change could dramatically affect your
code.

Here's another one:

If x = 7 And y = 8 Then...

In VB 6, you may be surprised to find, that even if x is not 7, the VB 6
runtime would still evaluate the y = 8 portion of the If statement. And, it
will do that as well in VB .NET! But, VB .NET adds the AndAlso keyword to
make the statement only need to look at the first portion of the test and if
it is false, then the second portion will be skipped.

When you convert something like this to VB .NET, the converter won't change
your And to AndAlso and the code will compile and run, but it won't be
taking advantage of the performance gain of AndAlso.

These are just two simple examples of code that *works* in both VB 6 and VB
.NET, but if you don't understand the inner workings of VB .NET, you'll not
be taking adavantage of all the language has to offer and you'll have
converted for no good reason.

Take the time to learn .NET from the ground up and you'll never go back to
VB 6 again.

-Scott


"C" <wrong.a...@gmail.com> wrote in message
news:0deb3ba7-9af8-4eef...@f33g2000vbm.googlegroups.com...

Scott M.

unread,
Sep 26, 2009, 11:08:20 AM9/26/09
to
Please don't post instructions on how to pirate Microsoft (or any other)
software here. Inappropriate doesn't begin to describe why it's not right.

-Scott

"Ato_Zee" <ato...@hotmail.com> wrote in message
news:e0qvm.183277$hv7.1...@newsfe10.ams2...

J.B. Moreno

unread,
Sep 26, 2009, 1:04:47 PM9/26/09
to
<wrong.a...@gmail.com> wrote:

-snip-


> I am in a similar situation, except that the decision is made: VB.net
> will be used in future.
>
> Over the last 14 years, thousands of lines of VB3-6 code has been
> written, almost all of which is in use. I wonder how long it could
> take to recode and not convert all of that. I cannot work full time as
> a programmer. On the other hand, most of my VB6 code is relatively
> simple - no databases, no communications with other programs or too
> many APIs. There is just graphics, mostly plots of 4 kinds. Is
> recoding a feasible option? Any estimate on how many weeks, months or
> years it could take me? I wonder how many months it will take me to
> learn "enough" of VB.net.

Well, my experience has been that upgrading to .Net is not only
feasible, but relatively straightforward. I've done two apps, one with
just a single form, and one with a couple of dozen.

Biggest problem has been third party tools and some database type
conversion issues.

Not having done anything with plots, I can't speak to that.

As for learning "enough" of VB.net it's less "VB" and more ".net" as in
the .Net Framework. While that's a large area, most of it you probably
won't need or need to learn.

I'd say go for it.

--
J.B. Moreno

Mike Williams

unread,
Sep 26, 2009, 1:54:27 PM9/26/09
to

"Scott M." <s-...@nospam.nospam> wrote in message
news:OBcN5qrP...@TK2MSFTNGP06.phx.gbl...

> As I mentioned in an earler post VB .NET is a new
> language that runs on a completely different runtime than VB 6.0.

At last, an honest admission of something VB6 programmers have been saying
all along, and something that has been consistently denied by the various
dotnet trolls who from time to time infest the VB6 newsgroup in their
deliberate attempt to destroy it.

> But, because (on the surface) VB 6 can look similiar to

> VB .NET, many folks get the incorrect perception . . .

Nope. That's not the reason. The real reason people get the wrong impression
is because that's how Micro$oft have dishonestly marketed it. VB.Net was a
lie from the very beginning, and still is a lie.

Mike

Mike Williams

unread,
Sep 26, 2009, 1:57:34 PM9/26/09
to
"Scott M." <s-...@nospam.nospam> wrote in message
news:OIU$$rrPKH...@TK2MSFTNGP02.phx.gbl...

> [Addressed to Ato_Zee] Please don't post instructions on


> how to pirate Microsoft (or any other) software here.

Why not? Micro$oft pirate other people's stuff. They behave like a bunch of
corporate gangsters.

Mike


C

unread,
Sep 26, 2009, 3:32:17 PM9/26/09
to

Thanks a lot for this advice. Several respectable people have told me
to learn VB.net, so I have accepted their word and will learn it. I
cannot afford to do it full time, or spend much of my day time doing
that, so it will be slow. Some questions/comments below.

On 26 syys, 18:06, "Scott M." <s-...@nospam.nospam> wrote:
> I own and operate an IT training company and am faced with this question all
> the time.  The fact is that VB 6 developers coming to .NET very often have a
> harder time, in some respects, than people who have no prior programming
> experience.

I have realised this. I am not able to unlearn easily even though I
normally learn new things relatively well and fast.

>
> This is because of the incorrect impression that VB .NET is just VB 6, with
> new features.  That's not the case at all.  As I mentioned in an earler post
> VB .NET is a new language that runs on a completely different runtime than
> VB 6.0.  But, because (on the surface) VB 6 can look similiar to VB .NET,
> many folks get the incorrect perception that they know enough VB 6.0 to just
> jump into VB .NET and get stuff done (and done correctly!).  This is false.

Well, I know VB.net has too many things which are different, and the
OO thinking is different, but all my math code will remain the same.

>
> You should move to .NET because it's already got 8 years of a track record
> as the successor to VB 6 and because it is much more in line with other
> modern OO languages.  Those who tell you that VB 6 still has its place for
> new application development, are just plain misinformed and/or uneducated
> about what .NET is all about.

Yes.

>
> I can't tell you how long it would take you to "convert" your VB 6 apps.,
> becuase, in many cases, a complete rewrite would be necessary, in order to
> reap the full benefits of .NET.
>
> Take it from someone who has made the transition as well as teaches others
> how to make the transition, start learning .NET with your eyes wide open and
> don't assume that you know how somthing should be done or how something
> works because of your VB 6 experience.  I can say that after 6 months of
> learning and practicing with VB .NET, you should begin to "get it" in terms
> of how .NET differs from VB 6 (and other forms of classic Windows and
> Internet) programming.

That would not be too bad.

>
> Take the time to learn .NET from the ground up and you'll never go back to
> VB 6 again.

Yes. I am just looking for the right material to read up, as another
post of mine this evening asked for. I found some good msdn material
which I have printed out, but will need a lot more of that.

>
> -Scott
>

C

unread,
Sep 26, 2009, 3:38:01 PM9/26/09
to
On 26 syys, 20:04, "J.B. Moreno" <pl...@newsreaders.com> wrote:

I am already able to replace the code for plotting, but I am now
wondering if the whole thing should be redone instead of converting. A
lot of mathematics (subroutines with only calculations; at the most
Text1.Text = temperature) will remain the same.

Nobody

unread,
Sep 26, 2009, 4:03:21 PM9/26/09
to
"C" <wrong.a...@gmail.com> wrote in message
news:0deb3ba7-9af8-4eef...@f33g2000vbm.googlegroups.com...
> Over the last 14 years, thousands of lines of VB3-6 code has been
> written, almost all of which is in use. I wonder how long it could
> take to recode and not convert all of that.

Some of the options available is KBasic. It's is similar to features to
VB.Net, but 100% VB6 code compatible, according to the author. It's open
source, and written in VC++ 2008. It uses Qt as GUI toolkit, and compiled
code runs on Windows/Linux/Mac. I haven't tried it myself, so you may want
to check it out:

http://www.kbasic.com
http://en.wikipedia.org/wiki/Qt_toolkit


J.B. Moreno

unread,
Sep 26, 2009, 5:15:55 PM9/26/09
to
<wrong.a...@gmail.com> wrote:

> On 26 syys, 20:04, "J.B. Moreno" <pl...@newsreaders.com> wrote:
> > �<wrong.addres...@gmail.com> wrote:
> >
> > -snip-
> >
> > > I am in a similar situation, except that the decision is made: VB.net
> > > will be used in future.
> >
> > > Over the last 14 years, thousands of lines of VB3-6 code has been
> > > written, almost all of which is in use. I wonder how long it could
> > > take to recode and not convert all of that. I cannot work full time as

-snip-


> > Well, my experience has been that upgrading to .Net is not only
> > feasible, but relatively straightforward. �I've done two apps, one with
> > just a single form, and one with a couple of dozen.

-snip-


> I am already able to replace the code for plotting, but I am now
> wondering if the whole thing should be redone instead of converting. A
> lot of mathematics (subroutines with only calculations; at the most
> Text1.Text = temperature) will remain the same.

I'd say give it a try and see how it goes -- don't be afraid of a lot
of errors to begin with, try fixing them and see where it goes.
There's probably only going to be a few basic types and fixing the
various instances one of the other (once you've figured it out) is
little more than typing (or even search and replace).

Before doing the conversion, it's recommended that you go through and
do what you can to make the conversion go more smoothly (again this is
mainly a lot of typing), in particular make sure that you've used a
declared type where ever possible and that parameters are declared as
ByVal unless they really need to be ByRef. The best thing about this
is that if you decide to stick with VB6, you've just cleaned up your
code a bit.

--
J.B. Moreno

C

unread,
Sep 26, 2009, 6:18:59 PM9/26/09
to
On 26 syys, 23:03, "Nobody" <nob...@nobody.com> wrote:
> "C" <wrong.addres...@gmail.com> wrote in message

I have checked various clones and none of them are 100% compatible. I
think it was in K Basic that you have declare every control object
manually and give it a number. Jabaco is one of the nicer options but
not very compatible with VB6.

I have to learn VB.net. That is decided. I can still decide to convert
the old codes or redesign and recode some of them. I am inclined to
learning for another few months with trial and error before starting
recoding.

Kevin Provance

unread,
Sep 26, 2009, 6:40:03 PM9/26/09
to

| > Despite what others say, if you want at the end a
| > program that is 10 times faster then VB6 (what is
| > possible with VB for Net) . . .
|
| Put your money where your mouth is fatty. And change that picture on your
| MVP profile. You look like a child molester with his head on upside down.

.Nxt faster than VB6? LMAO!!!

I have to agree with Mike, what would know about speed waddling the way you
must.


Nobody

unread,
Sep 26, 2009, 8:02:19 PM9/26/09
to
"C" <wrong.a...@gmail.com> wrote in message
news:c5ff7d34-964d-4cfd-9a66-

> I am inclined to
> learning for another few months with trial and error before starting
> recoding.

F2 is your friend then. It brings up Object Browser, which is the quickest
way to learn .Net framework. Try searching for "graphics" for instance.

Also, download MSDN Library so you have full reference. Here is the download
link:

http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=7bbe5eda-5062-4ebb-83c7-d3c5ff92a373

You need to uninstall the Express version of the library before installing
the full version as the second note in the link above says.


Tom Shelton

unread,
Sep 26, 2009, 8:59:18 PM9/26/09
to
On 2009-09-26, Kevin Provance <fu...@localhost.com> wrote:
>
>
>| > Despite what others say, if you want at the end a
>| > program that is 10 times faster then VB6 (what is
>| > possible with VB for Net) . . .
>|
>| Put your money where your mouth is fatty. And change that picture on your
>| MVP profile. You look like a child molester with his head on upside down.
>
> .Nxt faster than VB6? LMAO!!!
>

I hate to tell you this kev - but, it actually is for somethings. Not
everything... For instance, winforms uses GDI+ graphics, which is still
usually slower then the old GDI based forms used in VB6 - so, complex graphics
operations are definately slower.

But, I've been working on converting Olaf's Mandlebrot demo to .net (as time
permits) - and while the screen drawing is slower (though, I could probably
fix that if I used the API instead of the normal .net graphics methdos) -
when run in multithreaded mode, it is often twice as fast to do the actual
calculations on a large image. When run single threaded, it usually runs
about the same speed :)

That said, Cor does tend to exageration and misrepresentation of the speed
side of things - but, your personal attacks on him are to put it mildly,
disgusting.

So, STFU

--
Tom Shelton

Kevin Provance

unread,
Sep 26, 2009, 9:51:24 PM9/26/09
to

| That said, Cor does tend to exageration and misrepresentation of the speed
| side of things - but, your personal attacks on him are to put it mildly,
| disgusting.
|
| So, STFU

Blah blah blah. Bite me, bit<h


Alex Clark

unread,
Sep 27, 2009, 12:36:03 AM9/27/09
to
Mike,

I'd be happy to take that challenge. Case study:

Recordset with 10,000+ records which need to be written out to a file in CSV
format. Fairly standard, run of the mill export operation that you find in
loads of LOB apps these days. Oh, and we're working with strings so VB6
should be far quicker than .NET... right?

Let's see what you can do, and I guarantee .NET will better it in terms of
performance.

Alex


"Mike Williams" <Mi...@WhiskyAndCoke.com> wrote in message
news:O6pUQEqP...@TK2MSFTNGP02.phx.gbl...

Mike Williams

unread,
Sep 27, 2009, 9:34:03 AM9/27/09
to
"Alex Clark" <qua...@noemail.noemail> wrote in message
news:O3K1IwyP...@TK2MSFTNGP02.phx.gbl...


> I'd be happy to take that challenge. Case study: Recordset with 10,000+
> records which need to be written

> out to a file in CSV format . . . Let's see what you can do


> and I guarantee .NET will better it in terms of performance.

That wasn't the challenge, dick brain. The challenge was to attempt to prove
the claim made by one of your fellow conspirators that VB.Net is *** ten
times faster *** than VB6. In any case, I wasn't talking to you, Dick Brain
or Alex or Bill or whatever you are currently calling yourself. I was
talking to the other troll, fatty Ligthert. You remember, the short fat ugly
MVP who looks like a paedophile. He claimed that VB.Net is *** ten times
faster *** than VB6. Not just as fast, or nearly as fast, or somewhat
faster, but actually *** ten times as fast ***.

So, come on fatty, wherever you are, come on out of your little fat hiding
place Ligthert and take up the challenge. Let's write some code to load a
1024 x 768 pixel full colour .bmp file from disk (an image that would
typically contain hundreds of thousands of different colours, as do most
photos) and count the number of unique colours it actually contains. I've
specified a .bmp because such image files always contain an accurately
countable number of unique colours and so we can accurately compare our
results if we use the same .bmp image. The code should work on all machines
of course, regardless of the colour depth at which they are currently
running, and it should return the same number of unique colours for the same
.bmp file on all of them.

Your timer should count the total time to both load the .bmp file from disk
and count the unique colours, just to ensure that you can't cheat by
spending extra unmetered time loading the bitmap in such a way as to make it
easier for your timed code to deal with. For test purposes both the VB.Net
version and the VB6 version should be run on the same machine. We'll take an
average of the first ten calls to the routine, with the routine itself each
time loading the .bmp from disk anew and counting the colours as would
normally be the case when writing a general purpose function to which the
user can pass the name of any desired .bmp file. Let's provide a Button that
the user can click so that the function is run anew each time he clicks the
button, with the time displayed for each run on the Form somewhere, and then
you can just add up the times manually and take the average.

The code should be run in the condition that it would normally be delivered
to the user, which in the case of a VB6 program is a native code compiled
exe (we'll leave out any special compiler speed options for the time being
just to see how it works without them). Okay, fatty. Are you up for it?
Remember, your own VB.Net code needs to be *** ten times faster *** than my
VB6 code in order for you to win and prove your claim. Also remember that it
was you who made the claim fatty, so it should be your own code. Don't
cheat. Let me know when you've finished your VB.Net version and tested it,
and let me know how fast it is and we'll see whether or not it is ten times
faster than my own VB6 code, as per your claim. We can then swap code online
so others can try the two versions to see whether your *** ten times faster
than VB6 *** claim is another one of your lies or not. How about it, fatty?

Mike

Alex Clark

unread,
Sep 27, 2009, 3:22:08 PM9/27/09
to
"Mike Williams" <Mi...@WhiskyAndCoke.com> wrote in message
news:eiNwrc3...@TK2MSFTNGP02.phx.gbl...

> "Alex Clark" <qua...@noemail.noemail> wrote in message
> news:O3K1IwyP...@TK2MSFTNGP02.phx.gbl...
>
>
>> I'd be happy to take that challenge. Case study: Recordset with 10,000+
>> records which need to be written
>> out to a file in CSV format . . . Let's see what you can do
>> and I guarantee .NET will better it in terms of performance.
>
> That wasn't the challenge, dick brain. The challenge was to attempt to
> prove the claim made by one of your fellow conspirators that VB.Net is ***
> ten times faster *** than VB6.

And as I said, that's the example above. Put your money where your mouth
is, Kevin/Mike - I'm TELLING you that VB.NET will be faster than VB6 for
that particular example.

Or are you afraid you'll be proven wrong? Again.

Mike Williams

unread,
Sep 27, 2009, 4:55:37 PM9/27/09
to
"Alex Clark" <qua...@noemail.noemail> wrote in message
news:%23VhJTf6...@TK2MSFTNGP05.phx.gbl...


> And as I said, that's the example above. Put your money
> where your mouth is, Kevin/Mike

I didn't put my mouth anywhere, Clark/McCarthy, so I don't need to put my
money there either. It is your little fat accomplice Ligthert who was
shouting his mouth off, telling everyone that VB.Net is ten times fatser
than VB6, so it is your little fat accomplice who needs to put his money
where his mouth is.

> I'm TELLING you that VB.NET will be faster than

> VB6 for that particular example [saving some data
> in CSV format to disk].

You can tell me whatever you like. It doesn't matter. You are a dick head
troll and what you say is completely irrelevant. VB.Net may or may not be
faster than VB6 for that specific task. I never made any statement in that
regard either way. VB.Net will be faster for some tasks and slower for
others. Horses for courses. In fact, completely contrary to what you said
yourself, string handling is not VB6's forte due to the fact that VB always
uses two bytes per character for standard strings whereas many other things
do not, and various under the hood conversions occur when performing some
tasks, and it is therefore quite likely that VB.Net may be a little faster
for the specific task you have in mind. Not that it matters anyway
Clark/McCarthy because you are a total irrelevance in this matter, which is
between myself and your little fat accomplice. If you want to help your
little fat accomplice out with the challenge I have set him (although I
suspect your help would actually hinder him) then feel free to do so.
Remember, you're out to prove your little fat friend's stupid statement that
VB.Net is ten times faster than VB6.

Mike

Scott M.

unread,
Sep 27, 2009, 6:53:11 PM9/27/09
to
Since I've got some of the trolls blocked and can't respond to them
directly, I'll add this here:

http://www.google.com/url?q=http://www.clevelanddotnet.info/presentations/VBNetRawPerformance.doc&ei=7-G_Sv_rOoTU8Qao3uGcAQ&sa=X&oi=spellmeleon_result&resnum=2&ct=result&usg=AFQjCNE6dCe-oU9HY0Sn-dparQZWWzXw2Q

Now, keep in mind that this article/paper was written about the 1.0
framwork.

But, I really think the issue comes down to this.

VB 6 developers who want to move to .NET largely don't believe that they
have to spend the time to start all over and learn .NET from scratch because
they've seen VB .NET code and, at first glance, recognized many of the
language's keywords and come to the conclusion that VB .NET is just VB 6
with new stuff added.

Now, let me take a minute to qualify those statements. I am the
owner/operator of an IT training company and have been training folks from
all kinds of backgrounds (VB 6, COBOL, Java, new programmers) in .NET since
its inception. And, by the way, I myself, was a VB 6 developer/trainer
before .NET came out so I initially grappled with all this myself. I've
seen literally thousands of VB 6 developers move to .NET and honestly 90
somthing percent of them believe that they do not need any training in VB
.NET because of the VB 6 experience they already have.

This is very difficult to try to convince the VB 6 developer that, although
they may have many years of experience with classic VB, they really don't
know very much at all about .NET.

Now, here's where rumors and mis-information begins... Those VB 6 developers
who go off into the VB .NET world without proper instruction obviously start
by writing what they already know. The use MsgBox(), CStr, CLng, CDate, and
all the other code they've come to know and love. And you know what? That
code compiles, which reinforces that person's beliefs that they don't need
training in .NET because they are able to write functioning code.

Now, the next phase of this VB 6 developer's journey to .NET goes something
like this... The developer get's more adventurous and writes something
beyond a "Hello World" application and, much to their suprise the
application runs slowly. Slower, in fact, than it did in VB 6! Yet, since
the code they wrote compiled and does ultimately do the job, they believe
that they have coded the applicaiton correctly.

This is where posts in NG's that VB .NET sucks and runs slower than VB 6
come from. Developer's who haven't taken the time to learn about the
environment that they are working in and are uneducated as to how to code in
.NET properly.

I see this all the time and not just on the individual developer's part, but
with large Fortune 500 companies as well. I can't tell you how many times
I've been called in to figure out why a VB 6 application that was sent
off-shore to be "converted" to VB .NET came back running slower than when it
was sent out. The answer 100% of the time is that the applcation was only
converted to the point that it would compile. Older, antequated VB 6 code
that stull functions, but is not optimal was left in the application.

One of the simplest examples to illustrate this point is this:


[VB 6]

'Collect some data from the outside world
Dim age As Integer
age =CInt(txtAge.Text)


'Convert the data for internal program use
Dim agePlus100 As Long
agePlus100 = CLng(age) + 100

Now, to "convert" this code to VB .NET, you'd find that you don't have to do
anything at all. The code compiles and runs as is! But, the code is not
written properly to efficiently run in .NET. But, how would the VB 6
developer who is just plugging their way through VB .NET going to know that?
They won't. As far as they can tell, the code is correct because it compiles
and runs.

But, with a further understanding of how .NET works, we can see that this
code causes an unnecessary boxing and unboxing operation on the heap as well
as creating an unecessary object in memory.

Value types (Integers) are stored in .NET managed stack of memory, while
Reference types (objects and other class instances) are stored on the
managed heap.

The CLng() function accepts an "object" parameter in .NET, meaning that the
age parameter (which is already a value type of Integer and stored on the
stack with 4 bytes of memory) will be "boxed" up into an "object" type and
stored on the heap. This means that the data is now on the stack and the
heap and an extra object has been created in the process. But, wait it gets
better....

Now that the input (age) has been placed into an object on the heap, the
conversion can take place whcih results in a Long Integer being creaed on
the stack (8 bytes) and the data from the heap object is copied into it.

So, to get to the desired Long Integer, we have to create memory on the
heap, copy data over to it then copy data out of it and put the data into a
Long on the stack.

But, to do this properly and effectively in .NET, you shouldn't be using the
VB 6 conversion functions at all. You should write:

[Proper VB .NET]
'Collect some data from the outside world

Dim age As Integer
Dim result As Boolean = Integer.TryParse(txtAge.Text, age)

'Convert the data for internal program use
If result then
Dim agePlus100 As Long = Convert.ToInt64(age) + 100
End If

This is just one simple example of how applications written using VB 6
coding cause poor results and create a bad impression of how it performs.
There are MANY MANY other situations similar to this.

The fact is that, given proper instruction and understanding of how to code
agains the .NET Framework (not how to write VB .NET), you will create
efficient and effective code.

-Scott


"Alex Clark" <qua...@noemail.noemail> wrote in message

news:O3K1IwyP...@TK2MSFTNGP02.phx.gbl...

Schmidt

unread,
Sep 27, 2009, 6:59:16 PM9/27/09
to

"Alex Clark" <qua...@noemail.noemail> schrieb im Newsbeitrag
news:O3K1IwyP...@TK2MSFTNGP02.phx.gbl...


> I'd be happy to take that challenge. Case study:
>
> Recordset with 10,000+ records which need to be written out

> to a file in CSV format. Fairly standard, ...

Ok, in case you want to play with FileIO and String-Handling
(parsing, concatenating) - I'd be willing to take up this
"challenge", in case we can leave out the "DB-stuff", since
that would make the examples easier to implement on
both sides.

What, if the "Raw-Data" does not come from a DB, but from
a 'Src.csv'-File instead?

The task would then be, to read-in (parse) the 'Src.csv',
order the records by a certain String-Field and write the
sorted results back to a 'Dst.csv'.

Timing would then be measured "over-all" (parsing the Src.csv,
sorting, writing back to Dst.csv).

Here comes a concrete task-proposal:
Download 'holdings.csv' from:
http://www.archive.org/details/LibraryHoldingsData
which is ~8MB gz-compressed and unpacks to an about
80MB csv-File with "non-quoted string-field-content".

It contains only 4 Fields per record:
ISBN (String)
CarnegieNr (Integer)
LibName (String)
LibURL (String)

So, let's just parse that in, perform a simple binary sort (or
if you want, then also a caseinsensitive one) on the third
Field: LibName (String) - and write the sorted records
back to a Dst.csv in ascending (LibName) order.
To prevent "record-copy-over-trickery" at the ByteLevel,
there should be an additional condition, to write out each
String-Field content of the new File within additional
csv-quotes ("...").

That's an easy enough task-description, dealing with Files
and Strings, leaving out any ADO/ADO.NET- and DB-
dependencies.

If you agree about the outlined task, then we could start
immediately with that.

Olaf


nabh

unread,
Oct 1, 2009, 11:29:15 AM10/1/09
to
On Sep 26, 4:10 am, "George W. Barrowcliff"

<george.barrowcl...@flash.net> wrote:
> I have an application developed by someone else using VB6 that needs a few
> changes.  Last guy is gone, so is VB6 environment.
> I downloaded and installed 2008 Express, then converted application.

from the tone of the above you seems to have born right into dotnet.
No any umbilical relation with vb6 whatsoever.

and it explicitly shows you are a fresher at dotnet as well.

If you have some reasonable knowledge about VB6 and atleast 1 week
acquaintance with dotnet you wouldnt have imagined a
single click would convert a vb6 project into a dotnet one. It is a
near impossibilty to do it with even a 1000 clicks.
MS shouldnt have included a CONVERT option. Only Elementary school
level (Or shall I say 'Hello world Level') vb6 projects can be
converted into
dotnet with the conversion wizard

.. just putting your foot inside dotnet and you dared to declare
'gone, xxx VB6 environment'

But sure, VB6 wont officially make any return. (MS never acknowledge
their blunders, never learns from their errors, even the whole world
protests or cry foul they wont give a damn. Why should they? there is
not even a single competetor worth calling a competetor. Those who are
jumping into the fray do not attempt anything new, original, they are
obsessed with the success of MS and imitate MS products making one or
two tweakings here and there, and the end result always is a product
that is packed with more blunders than the original. Glaring example
FireFox.)

And Google? Google is the marvel of the IT world, as far as its search
engine is concerned, also google earth and many more. But when they
wanted to create a browser they were no better than the others in the
ring. Competetor? Sun is a gone case. Google seems to have the
resources, power and everything to be one, but somewhere, somehow they
are missing something; some lack of coordination? lack of streamlined
guidelines? not sure

VB6 wont comback. Dotnet will never be a replacement either. What
transpires next depends on who emerges as a threat to MS. if there is
no threat they will play this and that seldom caring for anyone. if
someone pose some real threat, they may change their attitude and
perhaps bring out another vb6 bottled in an entirely new name but a
clone of vb6 by soul, looks and manners.

Let us see

0 new messages