[Vb.net] Is there a way to use classic API like vb6?

dragon4spy

Well-known member
Joined
Dec 22, 2003
Messages
110
Hi everyone!

Does vb.net capable to use APIs just like vb6? Since, i am new to the .net game, i cant remember the whole namespaces yet.

Good luck!
 
Yes - check out the DLLImport attribute for the way to do this...(or you can just use the old Declare statement as per VB6.)
 
If you have the API Guide, it lists .NET equivalents for many
Windows API functions (in addition to being an immensly useful
API reference).
 
Yes, I have an API Guide. By comparing the API and namespaces, I am attracted by the namespaces, since they are more friendly and easier to use than API, that why, i think i need to shift to vb.net, but it takes time to be familiar with namespaces.

Besides, namespaces in API guide seems incompleted and lack of examples compare to its APIs.

What do you think, is it good or not to use a API that existed as namespace in .net?
 
If there is a class within the .Net framework that meets your requirements then it is usually better to go with the .Net class rather than the API.
The .Net framework gives you a more more Object Orientated way of dealing with things and is the development platform MS are pushing at the moment.
 
Its also worth mentioning that the Framework methods are
platform-independent, which is one of the goals and strengths of
the entire Framework. This is why the Framework has, in its short
life so far, already been ported to Linux and Windows CE devices. So,
try to stay safe and learn the new ways of the .NET.
 
Back
Top