Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 136,056 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,591 people online right now. Registration is fast and FREE... Join Now!




VB6 or VB.Net?

 
Reply to this topicStart new topic

VB6 or VB.Net?, Ways of telling in the code.

AdamSpeight2008
19 Jul, 2008 - 10:50 AM
Post #1

LINQ D.I.C.
Group Icon

Joined: 29 May, 2008
Posts: 797



Thanked: 51 times
Dream Kudos: 2175
My Contributions
Labels
You have a label on a form and
If you're using
vb

Label1.Caption = "Text for label"

it's VB6

If you're using
vb

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
vb

Button.Caption="Text on button"

it's VB6

You're using
vb

Button.Text="Text on button"

it's VB.Net

This post has been edited by AdamSpeight2008: 19 Jul, 2008 - 01:15 PM
User is offlineProfile CardPM
+Quote Post

Locke37
RE: VB6 Or VB.Net?
19 Jul, 2008 - 01:23 PM
Post #2

I'm not a thief...I prefer the term TREASURE HUNTER!
Group Icon

Joined: 20 Mar, 2008
Posts: 1,001



Thanked: 39 times
Dream Kudos: 325
My Contributions
Subs

If you're using
vb
Private Sub btnButton_Click()

'stuff

End Sub

it's VB6

If you're using
vb
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 Jul, 2008 - 07:55 PM
User is offlineProfile CardPM
+Quote Post

Zhalix
RE: VB6 Or VB.Net?
19 Jul, 2008 - 05:40 PM
Post #3

D.I.C Head
**

Joined: 7 May, 2008
Posts: 218



Thanked: 9 times
My Contributions
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. icon_up.gif
User is offlineProfile CardPM
+Quote Post

Locke37
RE: VB6 Or VB.Net?
19 Jul, 2008 - 07:24 PM
Post #4

I'm not a thief...I prefer the term TREASURE HUNTER!
Group Icon

Joined: 20 Mar, 2008
Posts: 1,001



Thanked: 39 times
Dream Kudos: 325
My Contributions
QUOTE(Zhalix @ 19 Jul, 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. icon_up.gif


Agreed.
User is offlineProfile CardPM
+Quote Post

no2pencil
RE: VB6 Or VB.Net?
19 Jul, 2008 - 07:28 PM
Post #5

My fridge be runnin OH NOEZ!
Group Icon

Joined: 10 May, 2007
Posts: 6,435



Thanked: 64 times
Dream Kudos: 2425
Expert In: Goofing Off

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

But it's a great topic. icon_up.gif
User is offlineProfile CardPM
+Quote Post

Locke37
RE: VB6 Or VB.Net?
19 Jul, 2008 - 07:47 PM
Post #6

I'm not a thief...I prefer the term TREASURE HUNTER!
Group Icon

Joined: 20 Mar, 2008
Posts: 1,001



Thanked: 39 times
Dream Kudos: 325
My Contributions
QUOTE(no2pencil @ 19 Jul, 2008 - 08:28 PM) *

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

But it's a great topic. icon_up.gif


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.
User is offlineProfile CardPM
+Quote Post

born2c0de
RE: VB6 Or VB.Net?
19 Jul, 2008 - 10:41 PM
Post #7

printf("I'm a %XR",195936478);
Group Icon

Joined: 26 Nov, 2004
Posts: 3,906



Thanked: 34 times
Dream Kudos: 2800
Expert In: 80x86 Assembly, C/C++, VB6, VB.NET, C#, J2SE, Win32 API, Reversing

My Contributions
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.
vb

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.

vb
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

User is offlineProfile CardPM
+Quote Post

mineeric123
RE: VB6 Or VB.Net?
23 Nov, 2008 - 08:41 PM
Post #8

New D.I.C Head
*

Joined: 12 Nov, 2008
Posts: 4

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

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/1/08 05:57PM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month