Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > vb6 to asp.net conversion question

Reply
Thread Tools

vb6 to asp.net conversion question

 
 
pb
Guest
Posts: n/a
 
      06-02-2007
Hi,
I am trying to convert some VB6 code to ASP.NET (as a way of
learning).

How would I declare the following in and vb.net code module?

Public Type POINTAPI()
x As Double
y As Double
End Type

Cheers,

Pb.

 
Reply With Quote
 
 
 
 
Juan T. Llibre
Guest
Posts: n/a
 
      06-02-2007
Do you have Visual Studio 2003 ?

If so, save a copy of the page which has your VB6 code and
use the Migration Assistant ( "File", "Open", "Convert" ).

It *really* helps when you want to convert VB6 to VB.NET.

See:
http://www.asp.net/migrationassistan...sptoaspnet.htm

There's instructions for batch conversion from the command-line, too.
That makes it real easy to copy a hole directory and conert all the files.

The converter adds a lot of code comments, too,
so you'll get a lot of hints for a lot of converted code.





Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
======================================
"pb" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> Hi,
> I am trying to convert some VB6 code to ASP.NET (as a way of
> learning).
>
> How would I declare the following in and vb.net code module?
>
> Public Type POINTAPI()
> x As Double
> y As Double
> End Type
>
> Cheers,
>
> Pb.
>



 
Reply With Quote
 
 
 
 
Juan T. Llibre
Guest
Posts: n/a
 
      06-02-2007
I forgot to add, there's a handy comparison between VB6 and VB.NET here :
http://www.ondotnet.com/pub/a/dotnet...ex.html?page=1

In page 2, the guide explains :

In VB 6, a structure or user-defined type is declared using the Type...End Type structure.

In VB .NET, the Type statement is not supported.

Structures are declared using the Structure...End Structure construct.

Also, each member of the structure must be assigned an access modifier,
which can be Public, Protected, Friend, ProtectedFriend, or Private.

(The Dim keyword is equivalent to Public in this context.)

For instance, in page 2, the VB 6 user-defined type:

Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type

is defined in VB .NET as:

Structure RECT
Public Left As Long
Public Top As Long
Public Right As Long
Public Bottom As Long
End Structure

You'll find that guide quite useful.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
======================================
"Juan T. Llibre" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Do you have Visual Studio 2003 ?
>
> If so, save a copy of the page which has your VB6 code and
> use the Migration Assistant ( "File", "Open", "Convert" ).
>
> It *really* helps when you want to convert VB6 to VB.NET.
>
> See:
> http://www.asp.net/migrationassistan...sptoaspnet.htm
>
> There's instructions for batch conversion from the command-line, too.
> That makes it real easy to copy a hole directory and conert all the files.
>
> The converter adds a lot of code comments, too,
> so you'll get a lot of hints for a lot of converted code.
>
>
>
>
>
> Juan T. Llibre, asp.net MVP
> asp.net faq : http://asp.net.do/faq/
> foros de asp.net, en espaņol : http://asp.net.do/foros/
> ======================================
> "pb" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) ups.com...
>> Hi,
>> I am trying to convert some VB6 code to ASP.NET (as a way of
>> learning).
>>
>> How would I declare the following in and vb.net code module?
>>
>> Public Type POINTAPI()
>> x As Double
>> y As Double
>> End Type
>>
>> Cheers,
>>
>> Pb.
>>

>
>






 
Reply With Quote
 
vergilfrans@gmail.com
Guest
Posts: n/a
 
      06-06-2007
Hi Juan,

Will not the migration assistant run by default when we open a VB6
application using dotnet?
Or should I do as you said
"If so, save a copy of the page which has your VB6 code and
use the Migration Assistant ( "File", "Open", "Convert" )."

I would like to know the difference..if any..

 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      06-06-2007
re:
!> Will not the migration assistant run by default when we open a VB6 application using dotnet?

Yes, which is why I suggest you save a copy of the page before opening it.

If you don't save a copy, you'll lose your original file...permanently.
That might have consequences for you.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaņol : http://asp.net.do/foros/
======================================
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Hi Juan,
>
> Will not the migration assistant run by default when we open a VB6
> application using dotnet?
> Or should I do as you said
> "If so, save a copy of the page which has your VB6 code and
> use the Migration Assistant ( "File", "Open", "Convert" )."
>
> I would like to know the difference..if any..
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Newbie Question: learn vb6 or .net -XC- ASP .Net 4 05-23-2005 01:43 PM
Newbie question: using .net web service with vb6 client geek2geek ASP .Net Web Services 0 11-06-2003 05:36 PM
VB6/VB.Net difference question Dave ASP .Net 2 08-12-2003 07:56 PM
VB6/VB.Net Programming Question - what am i doing wrong? Salisha Khan ASP .Net 1 08-01-2003 01:55 PM
newbie question - binding to VB6 form with XML? captain tom XML 0 07-17-2003 09:17 PM



Advertisments