Home All Groups Group Topic Archive Search About
Author
15 Jun 2006 6:57 PM
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

Author
15 Jun 2006 7:36 PM
gene kelley
Show quote Hide quote
On Thu, 15 Jun 2006 14:57:44 -0400, "vul" <a**@optonline.net> wrote:

>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/netframework/default.aspx?pull=/library/en-us/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
Author
15 Jun 2006 7:51 PM
vul
Thanks a lot gene. great sources

Al

Show quoteHide quote
"gene kelley" <o***@by.me> wrote in message
news:5fc392lsbg49ehqanb4714r9n33rv6ceh3@4ax.com...
> On Thu, 15 Jun 2006 14:57:44 -0400, "vul" <a**@optonline.net> wrote:
>
>>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/netframework/default.aspx?pull=/library/en-us/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
Author
15 Jun 2006 9:22 PM
Herfried K. Wagner [MVP]
"vul" <a**@optonline.net> schrieb:
> 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.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>