Jump to content
Xtreme .Net Talk

Recommended Posts

  • *Experts*
Posted

You have to pass the Application.ExecutablePath (path to the exe

with the exe filename itself) to the GetDirectoryName method

in the IO.Path class. I like to use this nifty little function:

 

Private Function AppPath() As String
 Return IO.Path.GetDirectoryName(Application.ExecutablePath) & "\"
End Function

"Being grown up isn't half as fun as growing up

These are the best days of our lives"

-The Ataris, In This Diary

  • *Experts*
Posted

Bah, I don't need to put up with this crap. ;)

 

And you're welcome, Bryan. :D

 

* Bucky glares at Derek

"Being grown up isn't half as fun as growing up

These are the best days of our lives"

-The Ataris, In This Diary

  • *Experts*
Posted
Vitaly: What are you talking about? This is a VB.NET forum, by the way.

"Being grown up isn't half as fun as growing up

These are the best days of our lives"

-The Ataris, In This Diary

  • *Experts*
Posted

We try to stress use of the .NET framework, rather than the old,

yucky Compatability namespace. Using it is just taking a step

backwards in VB evolution and not harnessing any of the new

power in the Framework.

 

Your way will work, but it is much more appropriate to use the

way mentioned above.

"Being grown up isn't half as fun as growing up

These are the best days of our lives"

-The Ataris, In This Diary

Posted

Bucky, I agree, .NET Framework is a lot more powerful then

VB6, but probably the best would be to combine all good that was in VB6 and all other previous versions with what new one has to offer. It would be also easier for people not to forget everything they did before.

Posted
So.. new folks to .NET should avoid referencing Microsoft.VisualBasic.Compatibility.* Namespaces at all costs? Are these the only Namespaces that use legacy VB6 code rather then .NET? I just want to make sure that I'm using pure .NET when I program my applications. :)
Gamer extraordinaire. Programmer wannabe.
  • *Gurus*
Posted

They don't use legacy code, rather, they offer methods of doing things syntactically similar to the older VB6 ways. The namespace is only there to help the VB6 Project Upgrade Wizard upgrade those old projects without changing too much code.

 

DON'T USE THEM! :)

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

  • 2 weeks later...
Posted
They don't use legacy code, rather, they offer methods of doing things syntactically similar to the older VB6 ways. The namespace is only there to help the VB6 Project Upgrade Wizard upgrade those old projects without changing too much code.

 

DON'T USE THEM! :)

 

I agree. MS gives the compatibility code there just so that it's easier for VB6 to get familiar with VB.net (sort of like an easy learning curve, a stepping stone).

 

Once you get used to the .net framework, you are ready to use the real thing (everything's there is a real thing, but you know what I mean :) )

Posted
now I am confused - If you use VB .Net I would think you have to use the .Net Framework - I have seen nothing compatible in any way whatsoever to VB6 - what is a Namespace? how is it compatible?
Posted

A Namespace is a group of related classes. There's a compatibility Namespace which allows you to use commands that are in VB6.

 

As you learn more about object oriented programming it'll make more sense. For now just be aware that it's there and that you should stay away from it. :)

Gamer extraordinaire. Programmer wannabe.
Posted

OK - I agree - I was thinking I could be using that VB6 compatible namespace without knowing it -

 

Is it correct then that I would have to include a definition line somewhere in order to be using it in my code? So that if I do not specifically do this then I am not using it ...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...