I'm converting some VB6 code to VB.net. A section of the code uses the Windows API to read text from a label in another application. I use the FindWindow API call to get the handle of the form I want, then use GetWindow to iterate through the objects on the form. I use GetClassName to find the type of the object, and then GetWindowText to actually read the value. This works great under VB6.
Under VB.net, I get a handle from FindWindow but I can't find anything after that. The handle returned seems too big. For example, Spy++ shows the handle of the form I'm looking for to be 00090662 but FindWindow returns 895000100090662. I have everything declared as Long.
Is this a difference between the way VB6 and .net store values? What do I need to do to get the correct handle?
Any help would be greatly appreciated.
jrl
Under VB.net, I get a handle from FindWindow but I can't find anything after that. The handle returned seems too big. For example, Spy++ shows the handle of the form I'm looking for to be 00090662 but FindWindow returns 895000100090662. I have everything declared as Long.
Is this a difference between the way VB6 and .net store values? What do I need to do to get the correct handle?
Any help would be greatly appreciated.
jrl