Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Wow, I got Visual Basic 2005 Express Edition and let me tell you, it's NOT at ALL like VB 6.0. It's really ridiculously over-complicated. Or maybe I'm just not doing things right. I don't know. Anyway, all I want is to be able to go to save file dialog box and use the result as a variable to be then used for a FileCopy. MSDN and the help only give ridiculously complex examples which I really could not grasp. Please skip the "maybe you shouldn't be programming" bit, I have done it before with VB 6.0 but it wasn't this complicated. Thanks.

"it's NOT at ALL like VB 6.0."
You've got that right. VB has gone through puberty..."It's really ridiculously over-complicated."
More complicated than VB6? yes. Over-complicated? No. Just like most things in computers, power and flexibility comes with the price of usability.VB.NET is really a different animal completely than VB6 - it has much more in common with C# than it does with previous versions of VB. The good news is that VB6 has grown up, and if you're willing to spend some time to learn the .NET framework, you'll be using a top-notch language, and no longer vulnerable to taunts by Java and C# programmers.
Anyway, to answer your question...I don't know how simple this was in VB6, but it's still pretty simple in VB.NET 2005:
'assuming you already have the source
'filename in a variable named sourceFilename
Dim fs as SaveFileDialog = New SaveFileDialog()
fs.ShowDialog()
Dim destFilename as String = fs.Filename
System.IO.File.Copy(sourceFilename, destFilename)Good luck,
-SN

Yeah, I figured it was closer to C than VB now. I guess it pleases the masses more having a programming language that seems like a programming language. I know it's not overly-complicated. I just took a semester of VB 6.0 in high school 4 years ago and seeing VB 2005 was like "Whoa, what the hell is this!?". Thanks for the reply, I'll give that code a whirl. :)

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |