What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Visual Basic 6 or Visual Basic .NET?

Visual Basic 6 or Visual Basic .NET?
Author: Message:
DJeX
Veteran Member
*****

Avatar


Posts: 1138
Reputation: 11
– / Male / –
Joined: Jul 2003
O.P. Roll Eyes  Visual Basic 6 or Visual Basic .NET?
I'm making a trojan detection program which will tell you whats connected to your computer, allows you to block IP's form connecting to your computer, Full netstats, and more. But since I really don't want to learn C++ I need a simple and effective code to make it in. Now I've started in VB 6 but I'm wondering if it would be worth while to move to VB. NET. Is VB.NET better? or should I stick with VB 6 for now?
[Image: top.gif]
08-25-2004 07:51 AM
Profile PM Web Find Quote Report
Mnjul
forum super mod
******

Avatar
plz wub me

Posts: 5396
Reputation: 58
– / Other / Flag
Joined: Nov 2002
Status: Away
RE: Visual Basic 6 or Visual Basic .NET?
To be honest, VB .Net, based on .Net Framework, has better Windows integration, and more importantly, easy access to Windows core functions (I think you may need this a lot). For example, registry accessing requires quite a few API calls, and you need to take care of things more than just calling those functions. But in VB .Net, it's been wrapped as Classes and things are a lot easier.

Still there are some disadvantages indeed, for example:
1. VB 6 and VB .Net is very different (I bet, more different than most of you think) when it comes to system-related programming. Re-learn :p
2. If you prepare to distribute your program, your users have to have .net redistributable package installed - that is not a small file. Usually a user wouldn't want to download a file 20MB+ large, for a small tool. :)
08-25-2004 10:31 AM
Profile PM Web Find Quote Report
spokes
Full Member
***

Avatar
I <3 Rollerblading

Posts: 423
Reputation: 10
33 / Male / Flag
Joined: May 2004
RE: Visual Basic 6 or Visual Basic .NET?
I'd personally use VB6 the run-times are smaller and most computers have them. As Mnjul said the .Net Framework is 20MB+ (23). VB.Net is better but some users may be limited

[Image: sig15ws.png]
08-25-2004 03:34 PM
Profile E-Mail PM Web Find Quote Report
DJeX
Veteran Member
*****

Avatar


Posts: 1138
Reputation: 11
– / Male / –
Joined: Jul 2003
O.P. RE: Visual Basic 6 or Visual Basic .NET?
Thanks, I'll stick with VB untill I feel like learning C++ (Which won't be for awhile now) o and have any of you (Mnjul, or  spokes25) read my post on UserControls? Would you know how to access A UserControl's objects. Like for example:

UserControl4.TextBox1.Text = Form1.TextBox1.Text

OR

UserControl4.TextBox1.Text = UserControl2.Label1.Caption


Just a question, I need to know how for my program. Thats why I thought of swiching to .NET in hope it would help me with that. But I guess there has to be a way to do it in VB.

This post was edited on 08-25-2004 at 04:37 PM by DJeX.
[Image: top.gif]
08-25-2004 04:32 PM
Profile PM Web Find Quote Report
Mnjul
forum super mod
******

Avatar
plz wub me

Posts: 5396
Reputation: 58
– / Other / Flag
Joined: Nov 2002
Status: Away
RE: Visual Basic 6 or Visual Basic .NET?
I think you should add member functions to user controls, like this...

This is UserControl2's member function. Assume it has a Checkbox named Check1

Public Function GetCheck1Caption() As String
    GetCheck1 = Check1.Caption
End Function


And in Form code you just... (uc2Control is a UserControl2)

'blahblah...
    Whatever=uc2Control.GetCheck1Caption
'blahblah...



I know it's a little bit troublesome (even strange). Actually, if you use VB.Net, this can be easier with its full OOP support.
08-25-2004 05:11 PM
Profile PM Web Find Quote Report
DJeX
Veteran Member
*****

Avatar


Posts: 1138
Reputation: 11
– / Male / –
Joined: Jul 2003
O.P. RE: Visual Basic 6 or Visual Basic .NET?
The only problem with that is it wont let you go from Control to Control only from Form to Control.

This post was edited on 08-25-2004 at 05:39 PM by DJeX.
[Image: top.gif]
08-25-2004 05:37 PM
Profile PM Web Find Quote Report
Mnjul
forum super mod
******

Avatar
plz wub me

Posts: 5396
Reputation: 58
– / Other / Flag
Joined: Nov 2002
Status: Away
RE: Visual Basic 6 or Visual Basic .NET?
Well...

Member function:
Public Sub SetCheck1Caption(NewCap As String)
    Check1.Caption = NewCap
End Sub

And then use something like this
uc1Blah.SetCheck1Caption uc2Blah.GetLabel1Caption()

This post was edited on 08-25-2004 at 05:48 PM by Mnjul.
08-25-2004 05:47 PM
Profile PM Web Find Quote Report
DJeX
Veteran Member
*****

Avatar


Posts: 1138
Reputation: 11
– / Male / –
Joined: Jul 2003
O.P. RE: Visual Basic 6 or Visual Basic .NET?
Humm well,

This is what I can do with the code:
(From a usercontrol) Text1.text = Form1.text

This is what I can't do (and that I need to do):
UserControl3.Text5.text = Text4.text (From a Form)
(From Control to Control) (From a Control) Text1.text = UserControl3.Text4.text (To a Control)

Basicly I need it so I can change stuff in a Control from a form and to change stuff from a control in another control.

Thanks for all your help so far I hope you can tell me what I need. :)
[Image: top.gif]
08-26-2004 01:51 AM
Profile PM Web Find Quote Report
Mnjul
forum super mod
******

Avatar
plz wub me

Posts: 5396
Reputation: 58
– / Other / Flag
Joined: Nov 2002
Status: Away
RE: Visual Basic 6 or Visual Basic .NET?
As I said, I think you should use member functions. Those child-controls have been wrapped and I don't think there's a way to access them directly. Are you sure that you want to use UserControls, instead of Forms with instances (Dim AForm as New frmFormTemplate)?
08-26-2004 02:46 AM
Profile PM Web Find Quote Report
DJeX
Veteran Member
*****

Avatar


Posts: 1138
Reputation: 11
– / Male / –
Joined: Jul 2003
O.P. Huh?  RE: Visual Basic 6 or Visual Basic .NET?
I'm sorry but I'm fairly new at VB, I know most things but not Instances or member functions. If you don't mind do you think you could explain a little more about those?

Thanks!

EDIT:
When I first started my program I needed somehting simple and quick to add into my main Form. So I used UserControls. Now I really dont want to add all my user controls to my main Form because of name conflicts. Like in UserControl1 I got Command1 and Text1 and so does my main Form. So I really don't want to rename all my objects and edit all my code to sute. That would be ALOT of work for me. Since i'm almost done this program I need a solution to fix this little problem I have got myself into. Any Sugestions.

This post was edited on 08-26-2004 at 05:41 AM by DJeX.
[Image: top.gif]
08-26-2004 05:09 AM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On