|
-
Dec 29th, 2004, 06:11 PM
#1
Thread Starter
Addicted Member
GetWindowRect in VB.net?
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
-
Dec 29th, 2004, 06:33 PM
#2
Sleep mode
-
Dec 29th, 2004, 10:22 PM
#3
Thread Starter
Addicted Member
Re: GetWindowRect in VB.net?
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.
-
Dec 29th, 2004, 11:57 PM
#4
Sleep mode
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 .
-
Dec 30th, 2004, 12:02 AM
#5
Thread Starter
Addicted Member
Re: GetWindowRect in VB.net?
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
-
Dec 30th, 2004, 12:04 AM
#6
Thread Starter
Addicted Member
Re: GetWindowRect in VB.net?
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?
-
Jan 3rd, 2005, 03:32 PM
#7
Re: GetWindowRect in VB.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.
My usual boring signature: Nothing
 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|