help with coding

midgetchris

New member
Joined
May 18, 2005
Messages
4
Programming Experience
Beginner
hi i was wondering if there is an equivilent of "GetCursorPos" "GetDesktopWindow" "GetPixel" and "SetCursorPos" for vb.net.i just cant figure it out...maybe i am thinking too hard? if there is would somebody kindly tell me the code ty.

christine
 
how do i do get this

codeSnippet language="C#">
[DllImport("user32.dll")]
public static extern IntPtr GetDesktopWindow();
</codeSnippet

into visual basic language. I do not have C# on this pc and need to find a way to do this in vb.net somehow. thanks
 
Last edited:
VB.NET:
<DllImport("user32.dll")> [color=Blue]Public Shared Function[/color] GetDesktopWindow() [color=Blue]As[/color] IntPtr
  [color=Green]'External function is left empty.[/color]
[color=Blue]End Function[/color]
May I also recommend more descriptive names for your posts in future. I'd guess that every post on these forums is for help with coding. :)
 
Last edited:
very confusing i must say ... i cannot find sense to implement IntPtr structure in this function (i don't know the purpose of IntPtr in your case)
Hmm .... probably

PHP:
 <DllImport("user32")> 
Public Function GetDesktopWindow(ByRef handle as IntPtr) As Boolean 'any other datatypes are valid

anyway you should know that IntPtr structure is used to allocate some memory and get its address

Cheers ;)
 
Last edited:
Back
Top