[Gambas-user] Control.Grab (gb.qt4) - The old way?

Charlie Ogier charlie at cogier.com
Tue Sep 8 16:32:56 CEST 2020

Hi Bruce,

You can get a control image with: -

PictureBox1.Picture = Desktop.Screenshot(Button1.ScreenX, 
Button1.ScreenY, Button1.Width, Button1.Height)

You can change 'Button1' to any control. How you get an image of a 
control you can't see is beyond me.


On 05/09/2020 20:25, Bruce wrote:
> On 6/9/20 4:49 am, Bruce wrote:
>> Like the fine help says, back in the olden days Control.Grab used to 
>> take a scrren shot of the control but that's gone away. Fine. But 
>> weirdly enough I now find that I want to get an image or picture of a 
>> control (or wondow) but primarily a specific control.
>> So, is there a way to so that now?
>> Failing that, would anyone have the code of how it was done in 
>> Gambas2 or any ideas of how it could be done?
>> tia
>> bruce
> Woops, I should have said: Also the control concerned may not be 
> actually visible at the time!
> b
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----

More information about the User mailing list