|
-
Mar 28th, 2000, 10:42 AM
#1
Thread Starter
Member
If anyone can offer a reasonable explanation for what follows, I'd sure love to hear it.
Basically, the situation is I've got some code to do form captures (I've left out the boring, mundane bitblt stuff that isn't relevant to the problem at hand). The given code has been working fine for a couple of months now.
Form 1
Private Sub Copy_Active_Pic()
Dim width, height As Long
hWndActive = GetForegroundWindow()
lRet = GetWindowRect(hWndActive, rct)
Debug.Print "getWindowRect= "; lRet
dcActive = GetWindowDC(hWndActive)
width = rct.Right - rct.Left
height = rct.Bottom - rct.Top
Debug.Print "width= "; width; "height="; height
When doing a full screen form capture, the above code yields
width= 808, height=578 (which is correct for the VB IDE form)
Last night, I did some tweaking and decided to make width and height global variables:
module 1
Global width, height as Long
This had the very bizarre effect of yielding the following:
width= 1800 (???) height= 574
The only other noteworthy thing I can think of is width and height were also declared as local variables in a function in another form. But this shouldn't have any effect, should it?
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
|