I'm trying to use getwindowrect and it keeps getting errors.. Is there something that is equivelent to that in VB.net so I don't have to declare APIs.. Thanks :)
-Jake
Printable View
I'm trying to use getwindowrect and it keeps getting errors.. Is there something that is equivelent to that in VB.net so I don't have to declare APIs.. Thanks :)
-Jake
I already looked there hehe.. It doesn't have anything for vb.net except it says System.Windows.Forms.Form.DesktopLocation; System.Windows.Forms.Form.Size, but thats for actual forms in your project.
What error are you getting when using the API call ? as a general API translation , change every Long type to Integer . And DesktopLocation method is the pure .NET way .
I figured it out. I had to use Dim R as New RECT() instead of Dim R as RECT. Can you explain why this is? Why are longs different now? I figured out all that. I figured out for findwindow that you can't use vbNullString, you have to declare either class or name as integer and pass it as 0 when you call it.. What other wierd changes are like this? Thanks :)
Oh yeah also, does the DesktopLocation thing work with windows that aren't Forms in your .net project? Like say there was a solitare window or something, and it's handle was 1234567. Could you get the left, right, top and bottom of that window with .NET?
Longs are now 64 bit integers, whereas pointers (any LPtype thing), and integers are 32 bits on Pentium processors. The advantage for this is that the size of number on which you can perform integer math has just increased far above the 2 billion limit of a 32 bit integer.