VB6 or VB.Net?

Ways of telling in the code.

  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »

51 Replies - 51805 Views - Last Post: 05 April 2013 - 02:58 AM Rate Topic: -----

Replies To: VB6 or VB.Net?

#2 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2216
  • View blog
  • Posts: 9,351
  • Joined: 29-May 08

Re: VB6 or VB.Net?

Post icon  Posted 19 July 2008 - 11:50 AM

Labels
You have a label on a form and
If you're using
Label1.Caption = "Text for label"


it's VB6

If you're using
Label1.Text= "Text for label"


it's VB.Net

Buttons
You have a button on a form.
To set the text on the button.

You're using
Button.Caption="Text on button"


it's VB6

You're using
Button.Text="Text on button"


it's VB.Net


Updated: 24 May 2010

If you're using one of the following Editions then it is based on VB.Net.
  • Visual Basic .NET (VB 7)
  • Visual Basic .NET 2003 (VB 7.1)
  • Visual Basic 2005 (VB 8.0)
  • Visual Basic 2008 (VB 9.0)
  • Visual Basic 2010 (VB 10.0)
  • or an Express Edition


VB6

Posted Image

VB.NET

Posted Image
Was This Post Helpful? 2

#5 Locke  Icon User is offline

  • Sarcasm Extraordinaire!
  • member icon

Reputation: 520
  • View blog
  • Posts: 5,596
  • Joined: 20-March 08

Re: VB6 or VB.Net?

Posted 19 July 2008 - 02:23 PM

Subs

If you're using
Private Sub btnButton_Click()

'stuff

End Sub

it's VB6

If you're using
Private Sub btnButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnButton.Click

'stuff

End Sub

it's VB.Net

This post has been edited by Locke37: 19 July 2008 - 08:55 PM

Was This Post Helpful? 2
  • +
  • -

#6 Zhalix  Icon User is offline

  • D.I.C Regular

Reputation: 20
  • View blog
  • Posts: 260
  • Joined: 07-May 08

Re: VB6 or VB.Net?

Posted 19 July 2008 - 06:40 PM

It'd be cool if first-time posters in the VB section had to read this before posting. Would probably save the moderators a lot of time. :^:
Was This Post Helpful? 0
  • +
  • -

#8 Locke  Icon User is offline

  • Sarcasm Extraordinaire!
  • member icon

Reputation: 520
  • View blog
  • Posts: 5,596
  • Joined: 20-March 08

Re: VB6 or VB.Net?

Posted 19 July 2008 - 08:24 PM

View PostZhalix, on 19 Jul, 2008 - 06:40 PM, said:

It'd be cool if first-time posters in the VB section had to read this before posting. Would probably save the moderators a lot of time. :^:


Agreed.
Was This Post Helpful? 1
  • +
  • -

#9 no2pencil  Icon User is offline

  • Head MFIC
  • member icon

Reputation: 5061
  • View blog
  • Posts: 26,433
  • Joined: 10-May 07

Re: VB6 or VB.Net?

Posted 19 July 2008 - 08:28 PM

** Pinned **
Although, little can be done to force anyone to read this.

But it's a great topic. :^:
Was This Post Helpful? 0
  • +
  • -

#10 Locke  Icon User is offline

  • Sarcasm Extraordinaire!
  • member icon

Reputation: 520
  • View blog
  • Posts: 5,596
  • Joined: 20-March 08

Re: VB6 or VB.Net?

Posted 19 July 2008 - 08:47 PM

View Postno2pencil, on 19 Jul, 2008 - 08:28 PM, said:

** Pinned **
Although, little can be done to force anyone to read this.

But it's a great topic. :^:


HOO-RAY!

Maybe some people will read this before they post. I don't think it'll keep them ALL organized...but it'll cut down on some of the wrong posting...I hope.
Was This Post Helpful? 1
  • +
  • -

#11 born2c0de  Icon User is offline

  • printf("I'm a %XR",195936478);
  • member icon

Reputation: 180
  • View blog
  • Posts: 4,667
  • Joined: 26-November 04

Re: VB6 or VB.Net?

Posted 19 July 2008 - 11:41 PM

There are far too many changes to mention here.
But I'll add another one:

VB.NET:
Control events usually have two parameters, the first one being an instance of the Object Class and the second one being a derived class of EventArgs. They are also followed by Handles <event>

Eg.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load


VB6:
Control Events either have no parameters or parameters of basic data types such as Integer, String etc.

Private Sub Form_Activate()

End Sub

Private Sub Form_DblClick()

End Sub

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)

End Sub

Private Sub Form_Load()

End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)

End Sub

Was This Post Helpful? 1

#12 mineeric123  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 36
  • Joined: 12-November 08

Re: VB6 or VB.Net?

Posted 23 November 2008 - 09:41 PM

Hello Everyone,


For a Rookie this was very helpful, because with out it, I may have been one of the people posting in the wrong place. Until now I had never really seen any VB6 code, or understood if it was really different.

Thanks
Was This Post Helpful? 1

#13 JerwinM  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 03-December 08

Re: VB6 or VB.Net?

Posted 03 December 2008 - 11:59 PM

View PostZhalix, on 19 Jul, 2008 - 05:40 PM, said:

It'd be cool if first-time posters in the VB section had to read this before posting. Would probably save the moderators a lot of time. :^:

gud day...im jerwin 18yrs old,2nd year bsit...i just need some help from you...can u help me of making basic calculator using vb6? please...what codes will i use to the numbers 0-9, the +,-,*,/ and =...etc....hoping you can help me.tnks.
Was This Post Helpful? 0
  • +
  • -

#14 Zooms  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 78
  • Joined: 04-December 08

Re: VB6 or VB.Net?

Posted 06 December 2008 - 06:53 AM

Oh, so the programs you make in, for example, visual basic 2008 can only be used in Windows?
Because the codes you have written are the "defaults" in it.
Was This Post Helpful? 1

#15 Locke  Icon User is offline

  • Sarcasm Extraordinaire!
  • member icon

Reputation: 520
  • View blog
  • Posts: 5,596
  • Joined: 20-March 08

Re: VB6 or VB.Net?

Posted 08 December 2008 - 10:56 AM

Correct, it's used with the .Net Framework. Only with Windows as far as I know. I'm sure SOMEONE has figured out how to ninja it onto another system.
Was This Post Helpful? 0
  • +
  • -

#16 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1632
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: VB6 or VB.Net?

Posted 08 December 2008 - 11:01 AM

The true .Net Framework will run only on Windows. There is now a version called Mono that will run on *Nix
Was This Post Helpful? 0
  • +
  • -

#17 Locke  Icon User is offline

  • Sarcasm Extraordinaire!
  • member icon

Reputation: 520
  • View blog
  • Posts: 5,596
  • Joined: 20-March 08

Re: VB6 or VB.Net?

Posted 09 December 2008 - 06:49 PM

View PostPsychoCoder, on 8 Dec, 2008 - 10:01 AM, said:

There is now a version called Mono that will run on *Nix


<off-topic>
Speaking of which...I still don't see that li'l penguin as your preferred operating system yet...:)
</off-topic>

This post has been edited by Locke37: 09 December 2008 - 06:49 PM

Was This Post Helpful? 0
  • +
  • -

#18 mailderemi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 27-January 09

Re: VB6 or VB.Net?

Posted 27 January 2009 - 11:55 PM

VB6 or VB.Net?
I am using VB for about 10 years... tested VB.Net 2003,2005,2008 and 2010 (beta)...
I think one of the FULL BUG program is Visual Studio .Net . Of course VS2008 is one of the bests but because of those bugs I prefer VB6...

I don't know if I put a link here, admin user makes me banded or...
This shows how powerful is VB6 !!
Was This Post Helpful? 0
  • +
  • -

#19 firebolt  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 92
  • View blog
  • Posts: 5,561
  • Joined: 20-February 09

Re: VB6 or VB.Net?

Posted 04 April 2009 - 01:53 AM

Great document which has the differences.

[attachment=11192:attachment]
Was This Post Helpful? 0
  • +
  • -

  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »