API Replacement

  • Thread starter Thread starter vul
  • Start date Start date
V

vul

I'm converting my VB6 project into VB 2005.
In VB6 I use several API functions, such as:
IsWindow, GetForegroundWindow, SetWindowPos, FindWindow, ShowWindow,
GetDesktopWindow and some others
All of them are used to work with external windows (Word, Acrobat etc)

I'm looking for their replacement with native Framework stuff or the way how
to use them in VB 2005 properly.
Some of them work the same way, some don't.
Where do I get some info about API replacement?
Google did not help me.

Thank you

Al
 
I'm converting my VB6 project into VB 2005.
In VB6 I use several API functions, such as:
IsWindow, GetForegroundWindow, SetWindowPos, FindWindow, ShowWindow,
GetDesktopWindow and some others
All of them are used to work with external windows (Word, Acrobat etc)

I'm looking for their replacement with native Framework stuff or the way how
to use them in VB 2005 properly.
Some of them work the same way, some don't.
Where do I get some info about API replacement?
Google did not help me.

Thank you

Al

Generally, the API's are the same except you have to change the data
types (i.e. Longs to Int32). "As Any" is not supported -- needs a
specific declared data type appropriate to your usage. "Type"
declares are not supported -- needs the equivalent "Structure"
declare.

There's a list, here, of some API's and suggested Framework
equivalents:
http://msdn.microsoft.com/netframew...dndotnet/html/win32map.asp#win32map_alphalist

There is an API viewer here:
http://www.activevb.de/rubriken/apiviewer/index-apiviewereng.html
In the 'options' of the viewer, you can set the viewer to show vb.net
syntax.

Gene
 
Thanks a lot gene. great sources

Al

gene kelley said:
Generally, the API's are the same except you have to change the data
types (i.e. Longs to Int32). "As Any" is not supported -- needs a
specific declared data type appropriate to your usage. "Type"
declares are not supported -- needs the equivalent "Structure"
declare.

There's a list, here, of some API's and suggested Framework
equivalents:
http://msdn.microsoft.com/netframew...dndotnet/html/win32map.asp#win32map_alphalist

There is an API viewer here:
http://www.activevb.de/rubriken/apiviewer/index-apiviewereng.html
In the 'options' of the viewer, you can set the viewer to show vb.net
syntax.

Gene
 
vul said:
I'm converting my VB6 project into VB 2005.
In VB6 I use several API functions, such as:
IsWindow, GetForegroundWindow, SetWindowPos, FindWindow, ShowWindow,
GetDesktopWindow and some others
All of them are used to work with external windows (Word, Acrobat etc)

The .NET Framework 2.0 doesn't contain much support for accessing other
applications' windows except 'System.Diagnostics.Process' which provides
rudimentary support for some basic operations.
 
Back
Top