Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bug in GDI+ Imgage Capture
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01524847
Message ID:
01525067
Vues:
50
Doug,
Unfortunately it did not change anything. I tried with the window maximized and normal with your code but no change. The form simply jumps down about 12 pixels leaving white space at the top of the _screen when the function runs regardless of the window state.

Any other ideas.
Thanks very much for the help.

John

>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
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform