Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bug in GDI+ Imgage Capture
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01524847
Message ID:
01525049
Views:
78
Likes (1)
Hi John.

>There is a bug in the loCaptureBmp function (below) in GDI+. Every time I run it the entire form jumps down one line and I have to set form.top = 0 to reset it. I tried LockScreen = .t. but it had no effect at all. Everything else works great but the screen jump is annoying to my customers.

I ran into this myself. The issue is that FromScreen changes the window to Normal and doesn't restore it, so if it was maximized, you have to do that yourself. It isn't a bug in GDIPlusX; it's just the way the GDI+ function it calls works. Here's the code I use to deal with this:
llMax = Thisform.WindowState = 2 
try
    loBmp = _Screen.System.Drawing.Bitmap.FromScreen(Thisform.imgLightBox)
catch
endtry
if llMax
    Thisform.WindowState = 2 
endif
Doug
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform