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

Join 132,089 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 2,291 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
post 19 Jul, 2008 - 10:50 AM
Post #1


LINQ D.I.C.

Group Icon
Joined: 29 May, 2008
Posts: 749



Thanked 48 times

Dream Kudos: 2075
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

Go to the top of the page

Locke37
post 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: 910



Thanked 30 times

Dream Kudos: 300
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

Go to the top of the page

Zhalix
post 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

Go to the top of the page

Locke37
post 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: 910



Thanked 30 times

Dream Kudos: 300
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

Go to the top of the page

no2pencil
post 19 Jul, 2008 - 07:28 PM
Post #5


My fridge be runnin OH NOEZ!

Group Icon
Joined: 10 May, 2007
Posts: 6,324



Thanked 57 times

Dream Kudos: 2375

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

Go to the top of the page

Locke37
post 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: 910



Thanked 30 times

Dream Kudos: 300
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

Go to the top of the page

born2c0de
post 19 Jul, 2008 - 10:41 PM
Post #7


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

Group Icon
Joined: 26 Nov, 2004
Posts: 3,905



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

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/21/08 08:55AM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month