Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

VB6 Conversion Help

Posted on 2004-03-25
6
Medium Priority
?
572 Views
Last Modified: 2008-03-17
Hi,

Converting a VB6 program and want to remove all the VB6 stuff even though the program works, anyone tell me if threre is a .NET equilivent to

Private Declare Function SetCursorPos Lib "user32" (ByVal x As Integer, ByVal y As Integer) As Integer
Private Declare Function GetDesktopWindow Lib "user32" () As Integer
Private Declare Function GetWindowDC Lib "user32" (ByVal hWnd As Integer) As Integer
Private Declare Function ReleaseDC Lib "user32" (ByVal hWnd As Integer, ByVal hdc As Integer) As Integer
Private Declare Function GetPixel Lib "gdi32" (ByVal hdc As Integer, ByVal x As Integer, ByVal y As Integer) As Integer
Private Declare Function GetCursorPos Lib "user32" (ByRef lpPoint As POINTAPI) As Integer
Private Declare Function GetExitCodeProcess Lib "kernel32" (ByVal hProcess As Integer, ByRef lpExitCode As Integer) As Integer
Private Declare Function GetCurrentProcess Lib "kernel32" () As Integer

Also there are references to

AxMSComctlLib
MsComctlLib
Microsoft.VisualBasic.Compatibality
stdole

all the rest are system. which look like .net references.

Can you see where a reference is used in code.
0
Comment
Question by:Plucka
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 18

Author Comment

by:Plucka
ID: 10675942
I think that shows me how to use them, I want to eliminate them by using .net framework classes if possible.
0
 
LVL 48

Expert Comment

by:AlexFM
ID: 10675977
GetCursorPos - see Control.MousePosition Property

GetCurrentProcess property - see Process.GetCurrentProcess Method, Process.Handle Property
GetExitCodeProcess - see Process.ExitCode Property

I will try to find other functions also.
0
 
LVL 4

Expert Comment

by:Nazdor
ID: 10686855
.net is "supposed" to be platform independent, so there are certain tasks that simply do not currently live in the .net world.   Most this is to do with window handling (eg GetDesktopWindow, EnumerateWindows).  For these you need to you platform interop.

You will probably find this link of use:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/win32map.asp

0
 
LVL 1

Accepted Solution

by:
GhostMod earned 0 total points
ID: 10854205
PAQd, no points refunded.

GhostMod
Community Support Moderator
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question