Select Area using mouse

Post your Gambas programming questions here.
Post Reply
johnaaronrose
Posts: 22
Joined: Saturday 21st July 2018 12:13pm
Location: Wolverhampton

Select Area using mouse

Post by johnaaronrose »

I have an app which includes a facility to select an area on the screen's available desktop. I've stripped the app down so that the FMain form just has a button to call the FSelectArea form. The area is selected by mouse button down on the left top corner and dragging to the bottom right corner and then mouse button up. As the cursor is dragged, I want a rectangle border to be drawn from the top left to the cursor's current position. What happens is that the available desktop is cleared. I've obviously misunderstood the DrawingArea object and its methods etc. I've attached the stripped down Test app as a compressed source file.
Attachments
Test.tar.gz
Stripped-down project as compressed source
(65.79 KiB) Downloaded 290 times
John
User avatar
cogier
Site Admin
Posts: 1125
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Select Area using mouse

Post by cogier »

Hi John and welcome to the forum.

I took a look at the code you posted on the Gambas Mailing list. Your 'simplified' code looked quite complicated to me. And then talk of capturing streams.... :?

However it made me think about a screenshot program that may assist you. Have a look here.
Post Reply