Anyone a VB.NET Guru?

Please support our VB.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
Reply

Join Date: Feb 2003
Posts: 793
Reputation: Paladine has a spectacular aura about Paladine has a spectacular aura about Paladine has a spectacular aura about 
Solved Threads: 26
Team Colleague
Paladine's Avatar
Paladine Paladine is offline Offline
Master Poster

Anyone a VB.NET Guru?

 
0
  #1
Feb 5th, 2003
Question (if you are a guru):

How do you code a Multiselect Listbox in VB.NET if there is no variant datatype?

I know how in VB and VBA... (or at least one way, there may be more)

Any suggestions?
Assistant Manager, Pharmacy Informatics
Wordpress Learning Blog
Updated : ASP.Net Login Code
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 898
Reputation: Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light 
Solved Threads: 28
Moderator
Tekmaven's Avatar
Tekmaven Tekmaven is offline Offline
The C# Man, Myth, Legend
 
0
  #2
Feb 8th, 2003
The varient datatype equivlent in VB.NET is Object.

Here's a sample:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim MyVar as Object
MyVar = "Hello"
MyVar = 10 + 10
MyVar += 50
MyVar = New FileStream("c:\test.txt", FileMode.Open)
MyVar = Nothing
End Sub

You can set basically anything to it :-). I don't reccomend using this type often, it takes lots of memory.

Also, you may want to set your variable equal to nothing when your finished with it, just in case the GC dosen't get to it fast enough.
-Ryan Hoffman

.NET Specialist / Webmaster, Extended64.com.
Please do not email or PM me with support questions. Please direct them to the forums instead.
Reply With Quote Quick reply to this message  
Join Date: Feb 2003
Posts: 793
Reputation: Paladine has a spectacular aura about Paladine has a spectacular aura about Paladine has a spectacular aura about 
Solved Threads: 26
Team Colleague
Paladine's Avatar
Paladine Paladine is offline Offline
Master Poster
 
0
  #3
Feb 10th, 2003
Thanks Tekmaven. Good point about the memory issue. I am so use to VBA and VB 6.0 that I was at a little loss when I read a VB.NET book and it said no Variant datatype. Now what you have stated makes sense. I guess that is the fun part of programming is to find the solution in a different way...
Assistant Manager, Pharmacy Informatics
Wordpress Learning Blog
Updated : ASP.Net Login Code
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 898
Reputation: Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light 
Solved Threads: 28
Moderator
Tekmaven's Avatar
Tekmaven Tekmaven is offline Offline
The C# Man, Myth, Legend
 
0
  #4
Feb 10th, 2003
:-D Glad I can help! The .NET framework is so amazing. You can do things so many ways, its a joke :-).

What's the best part? Your VB apps run just as fast as c# or c++ apps :-).

(I'm in a smiley mood)
-Ryan Hoffman

.NET Specialist / Webmaster, Extended64.com.
Please do not email or PM me with support questions. Please direct them to the forums instead.
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 1,135
Reputation: samaru is just really nice samaru is just really nice samaru is just really nice samaru is just really nice 
Solved Threads: 5
Team Colleague
samaru's Avatar
samaru samaru is offline Offline
a.k.a inscissor
 
0
  #5
Feb 15th, 2003
Well almost as fast. Even though it's the .NET architecture C# and C++ (even more) will always have less overhead than VB.
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 898
Reputation: Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light 
Solved Threads: 28
Moderator
Tekmaven's Avatar
Tekmaven Tekmaven is offline Offline
The C# Man, Myth, Legend
 
0
  #6
Feb 15th, 2003
Nope. C++ and C# apps compile to MSIL just like VB.net apps. MSIL is MSIL, and it executes at the same exact speed.

The only overhead? The .NET Framework itself.

*MSIL = Microsoft Intermediate Language
-Ryan Hoffman

.NET Specialist / Webmaster, Extended64.com.
Please do not email or PM me with support questions. Please direct them to the forums instead.
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 1,135
Reputation: samaru is just really nice samaru is just really nice samaru is just really nice samaru is just really nice 
Solved Threads: 5
Team Colleague
samaru's Avatar
samaru samaru is offline Offline
a.k.a inscissor
 
0
  #7
Feb 15th, 2003
Whether it's MSIL or anything else, there's still overhead, even in .NET. Otherwise, why would anyone use C++ or C# over VB? Any development tool that has premade objects, especially drag and drop ones like in VB.NET or VisualFoxPro create more overhead because you're giving up performance over simplicity.

Do you have any proof that it's the same speed? The reason I say this is because the same issue goes with anything else. You're adding another layer of complexity. JSPs are compiled to Java code but have to be converted to servlets first. Servlets are compiled directly to Java byte code but it's more time consuming to develop as compared to JSPs (even though they both run on the JRE). The same comparison goes with C++, C# vs VB.NET.
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 12,024
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 127
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: Anyone a VB.NET Guru?

 
0
  #8
Nov 21st, 2003
This is the exact point that Dr. Liang brought up in Programming Languages class yesterday. The higher the level of abstraction the more overhead there is. That's why OOP languages weren't developed sooner ... older hardware wouldn't have been able to handle dealing with the layer of abstraction they provide.
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/daniweb
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 898
Reputation: Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light Tekmaven is a glorious beacon of light 
Solved Threads: 28
Moderator
Tekmaven's Avatar
Tekmaven Tekmaven is offline Offline
The C# Man, Myth, Legend

Re: Anyone a VB.NET Guru?

 
0
  #9
Dec 1st, 2003
Ewww Dr. Liang! Was she the one that taught the robotics class with the Lego bots?

Heh, Hofstra's finest.
-Ryan Hoffman

.NET Specialist / Webmaster, Extended64.com.
Please do not email or PM me with support questions. Please direct them to the forums instead.
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 12,024
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 127
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: Anyone a VB.NET Guru?

 
0
  #10
Dec 1st, 2003
No, Dr. Barr teaches A.I. class
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/daniweb
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the VB.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC